The Engage SDK includes a set of sample apps that demonstrate how to integrate the SDK in your app to publish different types of content. These apps are a great way to learn how to use the SDK, to get started with the integration in your own app, as well as some best practices.
The sample apps are available in the following languages:
- Java
- Kotlin
To run a sample app, clone the Engage SDK Samples repository and open the sample app project in your preferred IDE. Then, follow the instructions in the README file to build and run the app.
The sample apps repository includes two apps to demonstrate publishing different types of content:
Read Sample App
This sample app demonstrates how to integrate 'reading' content using the Engage SDK APIs. The app includes the usage of different APIs mentioned in the Engage SDK Read: Third-party technical integration instructions
When reviewing this sample app, consider the following:
- The app is written entirely in Java.
- The main focal point of the code is in the read/publish directory, containing all code necessary to publish through the Engage SDK.
- The app demonstrates the use of WorkManager as recommended in the Engage API docs, and EngageServiceWorker is the worker which does the publishing.
- EbookToEntityConverter contains methods to build an Entity for publishing. This class is useful to show how to construct an entity from the data that already exists in your application.
Link to Engage SDK Read Sample App on Github
Watch Sample App
This sample app demonstrates how to integrate video content using the Engage SDK APIs. The app includes the usage of different APIs mentioned in the Engage SDK Watch: Third-party technical integration instructions
When reviewing this sample app, consider the following:
- The app is written entirely in Kotlin.
- The main focal point of the code is in the watch/publish directory, containing all code necessary to publish through the Engage SDK.
- The app demonstrates the use of WorkManager as recommended in the Engage API docs, and EngageServiceWorker is the worker which does the publishing.
- ItemToEntityConverter contains methods to build an Entity for publishing. This class is useful to show how to construct an entity from the data that already exists in your application.
Link to Engage SDK Watch Sample App on Github
Additional Tips
Here are some additional tips for using the Engage SDK sample apps:
- Use the sample apps to understand how to call specific Engage SDK APIs in your app.
- Experiment with different features of the Engage SDK.
Support
Contact engage-developers@google.com if you have any questions that are not covered here.