[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Engage SDK Sample Apps\n\nThe Engage SDK includes a set of sample apps that demonstrate how to integrate\nthe SDK in your app to publish different types of content. These apps are a\ngreat way to learn how to use the SDK, to get started with the integration in\nyour own app, as well as some best practices.\n\nThe [sample apps](https://github.com/googlesamples/engage-sdk-samples) are available in the following\nlanguages:\n\n- Java\n- Kotlin\n\nTo run a sample app, clone the\n[Engage SDK Samples repository](https://github.com/googlesamples/engage-sdk-samples) and open the sample\napp project in your preferred IDE. Then, follow the instructions in the\nREADME file to build and run the app.\n\nThe sample apps repository includes two apps to demonstrate publishing different\ntypes of content:\n\n- [Read Sample App](#read-sample-app)\n- [Watch Sample App](#watch-sample-app)\n\nRead Sample App\n---------------\n\nThis sample app demonstrates how to integrate 'reading' content using the Engage\nSDK APIs. The app includes the usage of different APIs mentioned in the\n[Engage SDK Read: Third-party technical integration instructions](/guide/playcore/engage/read)\n\nWhen reviewing this sample app, consider the following:\n\n- The app is written entirely in Java.\n- The main focal point of the code is in the [read/publish](https://github.com/googlesamples/engage-sdk-samples/tree/main/read/app/src/main/java/com/google/samples/quickstart/engagesdksamples/read/publish) directory, containing all code necessary to publish through the Engage SDK.\n- The app demonstrates the use of WorkManager as recommended in the Engage API docs, and [EngageServiceWorker](https://github.com/googlesamples/engage-sdk-samples/blob/main/read/app/src/main/java/com/google/samples/quickstart/engagesdksamples/read/publish/EngageServiceWorker.java) is the worker which does the publishing.\n- [EbookToEntityConverter](https://github.com/googlesamples/engage-sdk-samples/blob/main/read/app/src/main/java/com/google/samples/quickstart/engagesdksamples/read/converters/EbookToEntityConverter.java) 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.\n\n| **Note:** The sample app uses one worker for publishing, passing in flags indicating which cluster to publish. Depending on your app architecture, you might choose to use multiple workers.\n\n[Link to Engage SDK Read Sample App on Github](https://github.com/googlesamples/engage-sdk-samples/tree/main/read)\n\nWatch Sample App\n----------------\n\nThis sample app demonstrates how to integrate video content using the Engage SDK\nAPIs. The app includes the usage of different APIs mentioned in the\n[Engage SDK Watch: Third-party technical integration instructions](/guide/playcore/engage/watch)\n\nWhen reviewing this sample app, consider the following:\n\n- The app is written entirely in Kotlin.\n- The main focal point of the code is in the [watch/publish](https://github.com/googlesamples/engage-sdk-samples/tree/main/watch/app/src/main/java/com/google/samples/quickstart/engagesdksamples/watch/publish) directory, containing all code necessary to publish through the Engage SDK.\n- The app demonstrates the use of WorkManager as recommended in the Engage API docs, and [EngageServiceWorker](https://github.com/googlesamples/engage-sdk-samples/blob/main/watch/app/src/main/java/com/google/samples/quickstart/engagesdksamples/watch/publish/EngageServiceWorker.kt) is the worker which does the publishing.\n- [ItemToEntityConverter](https://github.com/googlesamples/engage-sdk-samples/blob/main/watch/app/src/main/java/com/google/samples/quickstart/engagesdksamples/watch/data/converters/ItemToEntityConverter.kt) 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.\n\n| **Note:** The sample app uses one worker for publishing, passing in flags indicating which cluster to publish. Depending on your app architecture, you might choose to use multiple workers.\n\n[Link to Engage SDK Watch Sample App on Github](https://github.com/googlesamples/engage-sdk-samples/tree/main/watch)\n\nAdditional Tips\n---------------\n\nHere are some additional tips for using the Engage SDK sample apps:\n\n- Use the sample apps to understand how to call specific Engage SDK APIs in your app.\n- Experiment with different features of the Engage SDK.\n\nSupport\n-------\n\nContact [engage-developers@google.com](mailto:engage-developers@google.com)\nif you have any questions that are not covered here."]]