Content SDK to be convenience layer either for API or for UI Rendering.
The project is divided into 2 moduels:
- content_api_sdk - a code that queries Mobitech content API SDK and provide a callback to process the returned java object. Use this module if you want to cusomize the UI layout. To use this project, add to your gradle.build the dependency:
implementation'io.mobitech.content_sdk:content_api_sdk:7.0.2'
Then initiate the module once:
recommendationService=RecommendationService.build(getApplicationContext(),getBaseContext().getString(R.string.MOBITECH_CONTENT_PUBLISHER_API_KEY),advertId);
Then use it:
recommendationService.getOrganicContent(null,5,new ContentCallback<List<Document>>(){
@Override
public void processResult(List<Document> contentResult,Context context){
//Do something with the documents
}
});
- content_ui_sdk - a code that queries Mobitech content UI SDK and provide a ready content UI . Use this module if you want the SDK to render the UI as well and you are satisfied with the layour. The usage of the content UI SDK is demonstrated here:
implementation'io.mobitech.content_sdk:content_ui_sdk:7.0.2'