https://github.com/systangotechnologies/android-sdk-boilerplate
https://github.com/systangotechnologies/android-sdk-boilerplate
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/systangotechnologies/android-sdk-boilerplate
- Owner: SystangoTechnologies
- License: mit
- Created: 2018-12-04T11:27:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-05T14:02:17.000Z (almost 7 years ago)
- Last Synced: 2025-04-23T04:05:36.864Z (over 1 year ago)
- Language: Java
- Size: 139 KB
- Stars: 13
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Android SDK Boilerplate
This project is the boilerplate of REST API based Android SDK/library.
The example of one REST API based SDK is [Microsoft Cognitive Face SDK](https://github.com/microsoft/Cognitive-Face-Android).
# How SDK users will use it
Users can use it as follows:
### Initialize the SDK with an APK key:
```java
SystangoRestClient systangoRestClient = new SystangoRestClient("{{API_KEY}}");
```
### Call any method according the the feature:
```java
systangoRestClient.feature1Method("value1", this);
```
where `value1` is the parameter from user and `this` is the callback
### Receive the result in callback:
```java
@Override
public void onFeature1Response(SampleResponse sampleResponse) {
if (sampleResponse.getError() != null) {
//Use sampleResponse here
String sampleField = sampleResponse.getBaseField();
} else {
//Handle error case here
Toast.makeText(this, sampleResponse.getError(), Toast.LENGTH_LONG).show();
}
}
```
The example of SDK usage is demonstrated in [ExampleActivity](https://github.com/SystangoTechnologies/Android-SDK-Boilerplate/blob/master/app/src/main/java/com/systango/boilerplate/activity/ExampleActivity.java).