本文へ移動
cccskills
無料GitHub で公開

engage-sdk-integration

Helps developers integrate, debug, and resolve Play Engage SDK implementation issues. Use when adding Engage SDK support, generating publishing code, mapping data classes to entities, or fixing SDK-related errors.

インストール方法を見る

含まれるファイル(28)

  • SKILL.md8.3 KB
  • references/android/guide/playcore/engage/faq.md22.7 KB
  • references/android/guide/playcore/engage/food.md52.9 KB
  • references/android/guide/playcore/engage/healthandfitness.md56.9 KB
  • references/android/guide/playcore/engage/listen.md47.7 KB
  • references/android/guide/playcore/engage/otherverticals.md87.8 KB
  • references/android/guide/playcore/engage/read.md37.6 KB
  • references/android/guide/playcore/engage/shopping.md55.0 KB
  • references/android/guide/playcore/engage/social.md31.1 KB
  • references/android/guide/playcore/engage/travel.md97.1 KB
  • references/android/guide/playcore/engage/tv/continue-watching/index.md1.1 KB
  • references/android/guide/playcore/engage/tv/entitlements.md15.1 KB
  • references/android/guide/playcore/engage/tv/getting-started.md21.0 KB
  • references/android/guide/playcore/engage/tv/recommendations.md18.3 KB
  • references/android/guide/playcore/engage/watch.md53.4 KB
  • references/clusters.md5.5 KB
  • references/common.md17.9 KB
  • references/patterns.md17.8 KB
  • references/requests.md8.4 KB
  • references/schemas/food.md18.6 KB
  • references/schemas/listen.md29.9 KB
  • references/schemas/other.md8.0 KB
  • references/schemas/read.md14.9 KB
  • references/schemas/shopping.md13.5 KB
  • references/schemas/social.md8.5 KB
  • references/schemas/travel.md34.0 KB
  • references/schemas/tv.md46.9 KB
  • references/schemas/watch.md43.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

This skill guides you through integrating the Play Engage SDK into an Android app. It ensures that the code follows the mandatory structure and uses the required Engage entities for each vertical.

Workflow

Follow these steps to assist the developer:

  1. Identify Vertical and Cluster:

    • Ask the developer which vertical their app belongs to based on references/schemas/.
    • Check if the integration is for TV or Mobile. Read the TV-specific sections in patterns.md as well if the integration is for TV.
    • Use {VERTICAL}.md in the references/schemas/ directory to identify the corresponding Engage entities and the client class name. The client field in the JSON provides the full class name. (e.g., com.google.android.engage.food.service.AppEngageFoodClient).
    • Note: Initializing the client class requires a Context parameter (e.g., AppEngageFoodClient(context)).
    • Always refer to common.md for common entities.
    • Ask which cluster type they want to publish from the supported cluster types for that vertical.
    • Find the method to call from {VERTICAL}.md in the references/schemas/ directory for the specified cluster. Each method will specify the request it expects.
    • Get the request structure from requests.md and clusters from clusters.md. Then suggest and use sources to fill the fields in the request structure correctly, along with the required entities and clusters.
  2. Generate Structured Boilerplate Code:

    • Create a new directory for all Engage-related code. Name the directory to match the naming convention of the existing codebase.
    • Generate the following classes using templates in patterns.md:
      • Constants: Holds constant values like attempt counts, publish types.
      • ItemToEntityConverter: Converts app's local models to Engage's Entity models.
      • ClusterRequestFactory: Constructs the publish requests.
      • EngageWorker: Handles the actual publishing and publish errors using WorkManager.
      • EngagePublisher: Orchestrates periodic and one-time jobs.
      • EngageBroadcastReceiver: Listens for AppEngageService intents and starts a one-time publish job from EngagePublisher. Important : Implement both static registration and dynamic registration patterns, including the companion object register method inside the EngageBroadcastReceiver class.
  3. Suggest Entity Mapping:

    • Ask the developer to provide their local model schema(e.g., a data class or a JSON snippet).
    • If they haven't provided one, share entities from {VERTICAL}.md in the references/schemas/ directory as a guide.
    • Once the local model is identified, suggest a mapping to the corresponding Engage entity.
    • Generate the conversion logic using the ItemToEntityConverter pattern in patterns.md and add it to the generated {ENGAGE_CODE_DIR}/ItemToEntityConverter
  4. Suggest Data Source:

    • Ask the developer to provide the source of actual data you'll publish.
    • Once the source of data is identified, use the source of data to fetch data in app's local model schema.
    • Use {ENGAGE_CODE_DIR}/ItemToEntityConverter to convert this data to Engage entity.
    • Use obtained Engage entity model data with {ENGAGE_CODE_DIR}/ ClusterRequestFactory to get cluster requests.
    • Call corresponding cluster publishing method obtained from {VERTICAL}.md in the references/schemas/ directory with the obtained request in previous step in {ENGAGE_CODE_DIR}/EngageWorker.
  5. Gradle and Manifest Updates:

    • Suggest updates to build.gradle and AndroidManifest.xml.
    • For mobile apps, use patterns.md.
    • For TV apps, use the TV-specific sections in patterns.md.
    • Provide the necessary implementation dependencies for build.gradle or build.gradle.kts from patterns.md.
    • Provide the <receiver> and <service> declarations for AndroidManifest.xml.
    • Note: There's no separate import according to vertical except TV. For each vertical other than TV 'com.google.android.engage:engage-core:1.5.12' is enough.
  6. Debugging:

    • Perform a Gradle sync.
    • If errors occur, follow this resolution order:
      • Fix import errors. For package com.google.android.engage or classes starting with AppEngage, verify the package name in the {VERTICAL}.md in references/schemas/ directory or common.md.
      • Fix any other errors.
    • Execute a full Gradle build and resolve any remaining compilation issues. Repeat this step until the Gradle build is successful.
  7. User Checklist: At the end of code generation, notify the user to go through this checklist to verify that the integration is complete and as intended: [ ] Verify that all the engage related files are created in {ENGAGE_CODE_DIR}/:

    • Constants

    • ItemToEntityConverter

    • ClusterRequestFactory

    • EngageWorker

    • {cluster_type}Publisher

    • EngageBroadcastReceiver [ ] Verify that app's local model is converted to Engage entity by populating the fields correctly in the model in {ENGAGE_CODE_DIR}/ ItemToEntityConverter. [ ] Verify that {ENGAGE_CODE_DIR}/EngageWorker uses the data source identified in Step 4. [ ] Verify that EngageBroadcastReceiver.register(context) is called within the Application class or MainActivity to register the receiver dynamically. [ ] Verify that AndroidManifest.xml contains the static <receiver> declaration for EngageBroadcastReceiver with the necessary intent actions.

    • Important : Explicitly instruct the developer to call EngageBroadcastReceiver.register(context) inside their custom Application class onCreate() (or their main activity onCreate()) to dynamically register the receiver. Stress that both static and dynamic registrations are required for the integration to function.

Reference Materials

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

adaptive

無料

Instructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto and XR. It includes how to handle different window sizes, pointing devices (such as mouse) and text entry devices (such as keyboard) using the Compose MediaQuery API. It also covers multi-pane layouts using Navigation3 Scenes, adaptive UI components (such as buttons) with varying target sizes, and adaptive layouts (including navigation areas - nav rails and nav bars) using the Compose Grid and FlexBox APIs.

日本語の概要は準備中です。原文の説明を表示しています。

kabirnayeem99/Ktor2Curl292026年8月31日 更新

Upgrades, or migrates, an Android project to use Android Gradle Plugin (AGP) version 9. Do not use this skill for migrating Kotlin Multiplatform (KMP) projects.

日本語の概要は準備中です。原文の説明を表示しています。

kabirnayeem99/Ktor2Curl292026年8月31日 更新

Provides instructions for installing and using the `android` CLI. The `android` command-line tool is a critical tool for Android development and helps you create new Android projects, run Android apps on devices, manage and interact with Android virtual devices (including screenshots and UI inspection), manage Android SDK components, look up official Android documentation, and discover and install official Android skills.

日本語の概要は準備中です。原文の説明を表示しています。

kabirnayeem99/Ktor2Curl292026年8月31日 更新

Analyzes Android apps to identify key user workflows for AppFunctions such as creating a note, playing media, or sending an automated or AI agent triggered message, voice commands, or system shortcuts, without needing to open the app UI. Generates Kotlin code to expose these workflows to the Android system, allowing agents to discover and execute them on-device. Also refines KDoc documentation to ensure AI agents correctly understand and use the provided functionality.

日本語の概要は準備中です。原文の説明を表示しています。

kabirnayeem99/Ktor2Curl292026年8月31日 更新

Use this skill to migrate legacy Android camera implementations (Camera1 or raw Camera2 APIs) to CameraX. CameraX is a lifecycle-aware Jetpack library built on top of Camera2 that resolves camera rotation issues and handles device dependencies.

日本語の概要は準備中です。原文の説明を表示しています。

kabirnayeem99/Ktor2Curl292026年8月31日 更新

Provides guidelines for developing projected Android XR apps for display glasses using the Jetpack Compose Glimmer UI toolkit. This skill covers foundational Glimmer design principles, workflows for implementing Jetpack Compose Glimmer, and interaction models for the glasses form factor. Use this skill to build an Android XR Augmented Experience app with Jetpack Compose Glimmer that adheres to the Glimmer design system for optimized glasses styling.

日本語の概要は準備中です。原文の説明を表示しています。

kabirnayeem99/Ktor2Curl292026年8月31日 更新

kabirnayeem99 のスキルをすべて見る

このスキルの問題を報告する