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.

How SDK users will use it

Users can use it as follows:

Initialize the SDK with an APK key:

SystangoRestClient systangoRestClient = new SystangoRestClient("{{API_KEY}}");

Call any method according the the feature:

systangoRestClient.feature1Method("value1", this);

where value1 is the parameter from user and this is the callback

Receive the result in callback:

@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.