Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
El SDK de Engage incluye un conjunto de apps de ejemplo que demuestran cómo integrar el SDK en tu app para publicar diferentes tipos de contenido. Estas apps son una excelente manera de aprender a usar el SDK y comenzar con la integración en tu propia app, además de algunas prácticas recomendadas.
Las apps de ejemplo están disponibles en los siguientes lenguajes:
Java
Kotlin
Para ejecutar una app de ejemplo, clona el repositorio de muestras del SDK de Engage y abre el proyecto de la app de ejemplo en tu IDE de preferencia. Luego, sigue las instrucciones en el archivo README para compilar y ejecutar la app.
El repositorio de apps de ejemplo incluye dos apps para demostrar la publicación de diferentes tipos de contenido:
Cuando revises esta app de ejemplo, ten en cuenta lo siguiente:
La app está escrita completamente en Java.
El punto focal principal del código se encuentra en el directorio read/publish, que contiene todo el código necesario para publicar a través del SDK de Engage.
La app muestra el uso de WorkManager como se recomienda en los documentos de la API de Engage, y EngageServiceWorker es el worker que realiza la publicación.
EbookToEntityConverter contiene métodos para crear una entidad de publicación. Esta clase es útil para mostrar cómo construir una entidad a partir de los datos que ya existen en tu aplicación.
Cuando revises esta app de ejemplo, ten en cuenta lo siguiente:
La app está escrita completamente en Kotlin.
El punto focal principal del código se encuentra en el directorio watch/publish, que contiene todo el código necesario para publicar a través del SDK de Engage.
La app muestra el uso de WorkManager como se recomienda en los documentos de la API de Engage, y EngageServiceWorker es el worker que realiza la publicación.
ItemToEntityConverter contiene métodos para compilar una entidad de publicación. Esta clase es útil para mostrar cómo construir una entidad a partir de los datos que ya existen en tu aplicación.
El contenido y las muestras de código que aparecen en esta página están sujetas a las licencias que se describen en la Licencia de Contenido. Java y OpenJDK son marcas registradas de Oracle o sus afiliados.
Última actualización: 2025-07-27 (UTC)
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-07-27 (UTC)"],[],[],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."]]