reis-mobile 0.3.6 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +24 -0
- package/README.md +175 -168
- package/THIRD_PARTY_NOTICES.md +224 -4
- package/agents/android-architect.md +89 -0
- package/agents/android-performance-engineer.md +92 -0
- package/agents/android-test-engineer.md +97 -0
- package/agents/flutter-test-engineer.md +2 -0
- package/agents/ios-architect.md +93 -0
- package/agents/ios-performance-engineer.md +92 -0
- package/agents/ios-test-engineer.md +95 -0
- package/agents/lead-mobile.md +10 -1
- package/agents/mobile-staff-engineer.md +1 -1
- package/agents/rn-architect.md +94 -0
- package/agents/rn-performance-engineer.md +92 -0
- package/agents/rn-test-engineer.md +98 -0
- package/bin/reis-mobile.mjs +59 -17
- package/commands/debate.md +10 -1
- package/commands/debug.md +60 -0
- package/commands/reis-mobile.md +7 -2
- package/core/config/project.mjs +59 -0
- package/core/registry/frontmatter.mjs +15 -4
- package/core/registry/registry.mjs +21 -1
- package/core/router/intents.mjs +2 -0
- package/core/router/router.mjs +10 -5
- package/package.json +1 -1
- package/skills/android-adaptive/SKILL.md +304 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/container-behavior.md +112 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/get-started.md +69 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/index.md +81 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/item-behavior.md +170 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/container-properties.md +415 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/get-started.md +51 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/index.md +73 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/item-properties.md +170 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/mediaquery/index.md +333 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/tooling/debug.md +114 -0
- package/skills/android-adaptive/references/android/guide/navigation/navigation-3/recipes/material-listdetail.md +141 -0
- package/skills/android-agp-9-upgrade/SKILL.md +106 -0
- package/skills/android-agp-9-upgrade/references/android/build/migrate-to-built-in-kotlin.md +416 -0
- package/skills/android-agp-9-upgrade/references/android/build/releases/agp-9-0-0-release-notes.md +554 -0
- package/skills/android-agp-9-upgrade/references/buildconfig.md +54 -0
- package/skills/android-agp-9-upgrade/references/ksp-kapt.md +39 -0
- package/skills/android-agp-9-upgrade/references/paparazzi-gradle-9.md +30 -0
- package/skills/android-agp-9-upgrade/references/recipes.md +62 -0
- package/skills/android-appfunctions/SKILL.md +74 -0
- package/skills/android-appfunctions/references/adb-interaction-testing.md +95 -0
- package/skills/android-appfunctions/references/context.md +26 -0
- package/skills/android-appfunctions/references/feature-discovery-analysis.md +71 -0
- package/skills/android-appfunctions/references/implementation-configuration.md +282 -0
- package/skills/android-appfunctions/references/kdoc-refinement-optimization.md +75 -0
- package/skills/android-appfunctions/references/migrate-to-service-entry-point.md +226 -0
- package/skills/android-camerax/SKILL.md +135 -0
- package/skills/android-camerax/references/camera1-to-camerax.md +198 -0
- package/skills/android-camerax/references/camera2-to-camerax.md +193 -0
- package/skills/android-camerax/references/expert-blueprints.md +58 -0
- package/skills/android-camerax/references/foldables.md +83 -0
- package/skills/android-camerax/references/immutability.md +60 -0
- package/skills/android-camerax/references/low-light.md +124 -0
- package/skills/android-camerax/references/mlkit-spatial.md +75 -0
- package/skills/android-camerax/references/modern-apis.md +42 -0
- package/skills/android-camerax/references/testing.md +69 -0
- package/skills/android-camerax/references/thermals.md +85 -0
- package/skills/android-camerax/references/wear-os.md +76 -0
- package/skills/android-camerax/references/xr.md +54 -0
- package/skills/android-cli/SKILL.md +474 -0
- package/skills/android-cli/references/interact.md +113 -0
- package/skills/android-cli/references/journeys.md +120 -0
- package/skills/android-code-review/SKILL.md +58 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/SKILL.md +340 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/design/ui/ai-glasses/guides/interaction/inputs.md +67 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/access-hardware-projected-context.md +388 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/buttons.md +139 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/cards.md +148 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/focus.md +107 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/icons.md +90 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/text.md +69 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/title-chips.md +82 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/request-hardware-permissions.md +213 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/button-samples-source.md +176 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/button-source.md +203 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/card-samples-source.md +296 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/card-source.md +515 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/deptheffect-source.md +224 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/deptheffectlevels-source.md +105 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/glimmersansflextypography-source.md +270 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/glimmertheme-source.md +182 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/icon-source.md +388 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/iconbutton-source.md +126 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/iconsizes-source.md +78 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/list-source.md +27 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/listitem-source.md +272 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/liststate-source.md +427 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/material-hct-source.md +217 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/projectedcontext-source.md +265 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stack-source.md +368 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stackitemscope-source.md +440 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stackstate-source.md +325 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/surface-source.md +1211 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/titlechip-samples-source.md +101 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/titlechip-source.md +131 -0
- package/skills/android-edge-to-edge/SKILL.md +429 -0
- package/skills/android-engage-sdk-integration/SKILL.md +130 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/faq.md +439 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/food.md +1149 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/healthandfitness.md +1055 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/listen.md +1050 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/otherverticals.md +1301 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/read.md +910 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/shopping.md +1224 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/social.md +719 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/travel.md +1413 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/continue-watching/index.md +19 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/entitlements.md +353 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/getting-started.md +202 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/recommendations.md +471 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/watch.md +1081 -0
- package/skills/android-engage-sdk-integration/references/clusters.md +154 -0
- package/skills/android-engage-sdk-integration/references/common.md +519 -0
- package/skills/android-engage-sdk-integration/references/patterns.md +527 -0
- package/skills/android-engage-sdk-integration/references/requests.md +260 -0
- package/skills/android-engage-sdk-integration/references/schemas/food.md +509 -0
- package/skills/android-engage-sdk-integration/references/schemas/listen.md +842 -0
- package/skills/android-engage-sdk-integration/references/schemas/other.md +220 -0
- package/skills/android-engage-sdk-integration/references/schemas/read.md +412 -0
- package/skills/android-engage-sdk-integration/references/schemas/shopping.md +357 -0
- package/skills/android-engage-sdk-integration/references/schemas/social.md +228 -0
- package/skills/android-engage-sdk-integration/references/schemas/travel.md +923 -0
- package/skills/android-engage-sdk-integration/references/schemas/tv.md +1226 -0
- package/skills/android-engage-sdk-integration/references/schemas/watch.md +1137 -0
- package/skills/android-engage-sdk-integration/references/troubleshooting.md +39 -0
- package/skills/android-gradle-build-debug/SKILL.md +71 -0
- package/skills/android-intent-security/SKILL.md +550 -0
- package/skills/android-leanback-to-compose-tv-migration/SKILL.md +743 -0
- package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/get-started/navigation.md +372 -0
- package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/playback/compose/browse.md +243 -0
- package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/playback/compose/index.md +153 -0
- package/skills/android-media3-cast-integration/SKILL.md +236 -0
- package/skills/android-media3-cast-integration/references/android/media/media3/cast/create-castplayer.md +390 -0
- package/skills/android-media3-cast-integration/references/android/media/media3/cast/customize-castoptions.md +93 -0
- package/skills/android-media3-cast-integration/references/android/media/media3/cast/index.md +21 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/SKILL.md +127 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/analysis-of-the-project-and-layout.md +42 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/designsystems/migrate-xml-theme-to-compose.md +171 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/migrate/interoperability-apis/compose-in-views.md +299 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/migrate/interoperability-apis/views-in-compose.md +286 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/setup-compose-dependencies-and-compiler.md +197 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/identify-optimal-xml-candidate.md +31 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/xml-layout-migration.md +86 -0
- package/skills/android-ml-kit-genai-prompt-api/SKILL.md +124 -0
- package/skills/android-ml-kit-genai-prompt-api/references/get-started.md +272 -0
- package/skills/android-ml-kit-genai-prompt-api/references/prefix-caching.md +146 -0
- package/skills/android-ml-kit-genai-prompt-api/references/prompt-design.md +55 -0
- package/skills/android-ml-kit-genai-prompt-api/references/prompt-optimization.md +74 -0
- package/skills/android-ml-kit-genai-prompt-api/references/structured-output.md +219 -0
- package/skills/android-ml-kit-genai-prompt-api/references/system-instructions.md +71 -0
- package/skills/android-navigation-3/SKILL.md +122 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/index.md +51 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/migration-guide.md +670 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/animations.md +147 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basic.md +89 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basicdsl.md +85 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basicsaveable.md +90 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/bottomsheet.md +195 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/common-ui.md +200 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/conditional-transitions.md +182 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/conditional.md +230 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-custommatcher.md +176 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-staticuri.md +140 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-syntheticbackstack.md +184 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/dialog.md +107 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/lifecycle-owner.md +185 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/material-listdetail.md +141 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/material-supportingpane.md +145 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/modular-hilt.md +283 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/modular-koin.md +287 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/multiple-backstacks.md +468 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/passingarguments.md +371 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/results-event.md +273 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/results-state.md +266 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/scenes-listdetail.md +435 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/scenes-twopane.md +244 -0
- package/skills/android-navigation-3/references/android/guide/navigation/type-safe-destinations.md +129 -0
- package/skills/android-navigation-event/SKILL.md +312 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/dispatcher.md +134 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/handle-back.md +217 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/index.md +83 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/setup.md +32 -0
- package/skills/android-play-billing-library-version-upgrade/SKILL.md +96 -0
- package/skills/android-play-billing-library-version-upgrade/references/android/google/play/billing/release-notes.md +1240 -0
- package/skills/android-play-billing-library-version-upgrade/references/migration-logic.md +78 -0
- package/skills/android-play-billing-library-version-upgrade/references/version-checklist.md +54 -0
- package/skills/android-play-policy-insights/SKILL.md +172 -0
- package/skills/android-play-policy-insights/resources/common_mandates.md +100 -0
- package/skills/android-play-policy-insights/resources/compliance_report_template.md +59 -0
- package/skills/android-play-policy-insights/resources/critic.md +86 -0
- package/skills/android-play-policy-insights/resources/goal_data_safety.md +212 -0
- package/skills/android-play-policy-insights/resources/goal_permissions_and_apis.md +459 -0
- package/skills/android-play-policy-insights/resources/goal_user_account.md +106 -0
- package/skills/android-play-policy-insights/resources/policies.json +321 -0
- package/skills/android-play-policy-insights/resources/scanner_config.json +843 -0
- package/skills/android-play-policy-insights/scripts/generate_report.py +860 -0
- package/skills/android-play-policy-insights/scripts/orchestrator.py +1313 -0
- package/skills/android-play-policy-insights/scripts/play_store_scraper.py +410 -0
- package/skills/android-play-policy-insights/scripts/scanner.py +261 -0
- package/skills/android-play-policy-insights/scripts/template_engine.py +243 -0
- package/skills/android-profiler/SKILL.md +60 -0
- package/skills/android-profiler/analysis/analysis_orchestrator.md +32 -0
- package/skills/android-profiler/analysis/workflows/perfetto-sql/perfetto_sql.md +28 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/perfetto_trace_analysis.md +121 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/guiding_principles.md +51 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/domain_hints_template.md +7 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_cpu.md +56 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_graphics.md +51 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_io.md +46 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_ipc.md +41 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_memory.md +55 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_power.md +33 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/per_candidate_analysis.md +172 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/triage.md +94 -0
- package/skills/android-profiler/recording/recording_orchestrator.md +36 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/perfetto_trace_recording.md +148 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/app_jank.pftxt +43 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/cpu_profile.pftxt +35 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/java_heap_dump.pftxt +21 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/long_background.pftxt +37 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/memory_counters.pftxt +45 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/native_heap.pftxt +21 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/sched_cpu.pftxt +33 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/trace_config_reference.md +102 -0
- package/skills/android-profiler/references/env_setup.md +15 -0
- package/skills/android-profiler/references/perfetto/setup.md +29 -0
- package/skills/android-profiler/references/perfetto/sql.md +327 -0
- package/skills/android-r8-analyzer/SKILL.md +72 -0
- package/skills/android-r8-analyzer/references/CONFIGURATION-ANALYZER.md +287 -0
- package/skills/android-r8-analyzer/references/CONFIGURATION.md +44 -0
- package/skills/android-r8-analyzer/references/KEEP-RULES-IMPACT-HIERARCHY.md +83 -0
- package/skills/android-r8-analyzer/references/REDUNDANT-RULES.md +222 -0
- package/skills/android-r8-analyzer/references/REFLECTION-GUIDE.md +139 -0
- package/skills/android-r8-analyzer/references/REPORT_FORMAT.md +51 -0
- package/skills/android-r8-analyzer/references/android/topic/performance/app-optimization/enable-app-optimization.md +252 -0
- package/skills/android-r8-analyzer/references/android/training/testing/other-components/ui-automator.md +312 -0
- package/skills/android-restore-credentials/SKILL.md +359 -0
- package/skills/android-restore-credentials/references/android/guide/topics/manifest/application-element.md +832 -0
- package/skills/android-restore-credentials/references/android/identity/passkeys/create-passkeys.md +327 -0
- package/skills/android-restore-credentials/references/android/identity/passkeys/sign-in-with-passkeys.md +219 -0
- package/skills/android-styles/SKILL.md +229 -0
- package/skills/android-styles/references/android/develop/ui/compose/designsystems/custom.md +459 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/fundamentals.md +421 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/state-animations.md +461 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/styles-vs-modifiers.md +48 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/theming.md +269 -0
- package/skills/android-verified-email/SKILL.md +432 -0
- package/skills/android-verified-email/references/android/identity/credential-manager/index.md +67 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/credential-verifier.md +166 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/email-verification-implementation.md +313 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/email-verification.md +158 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/index.md +112 -0
- package/skills/android-verified-email/references/android/identity/passkeys/create-passkeys.md +327 -0
- package/skills/android-verified-email/references/android/identity/sign-in/credential-manager-webview.md +84 -0
- package/skills/android-wear-compose-m3/SKILL.md +365 -0
- package/skills/android-wear-compose-m3/references/android/training/wearables/compose/migrate-to-material3.md +677 -0
- package/skills/android-wear-compose-m3/references/foundation/AmbientModeSample.kt.md +123 -0
- package/skills/android-wear-compose-m3/references/foundation/AmbientModeSample.kt.md.txt +123 -0
- package/skills/android-wear-compose-m3/references/foundation/CurvedWorldSample.kt.md +430 -0
- package/skills/android-wear-compose-m3/references/foundation/CurvedWorldSample.kt.md.txt +430 -0
- package/skills/android-wear-compose-m3/references/foundation/ExpandableSample.kt.md +99 -0
- package/skills/android-wear-compose-m3/references/foundation/ExpandableSample.kt.md.txt +99 -0
- package/skills/android-wear-compose-m3/references/foundation/HierarchicalFocusSample.kt.md +141 -0
- package/skills/android-wear-compose-m3/references/foundation/HierarchicalFocusSample.kt.md.txt +141 -0
- package/skills/android-wear-compose-m3/references/foundation/PagerSamples.kt.md +56 -0
- package/skills/android-wear-compose-m3/references/foundation/PagerSamples.kt.md.txt +56 -0
- package/skills/android-wear-compose-m3/references/foundation/RotarySamples.kt.md +153 -0
- package/skills/android-wear-compose-m3/references/foundation/RotarySamples.kt.md.txt +153 -0
- package/skills/android-wear-compose-m3/references/foundation/ScalingLazyColumnSample.kt.md +131 -0
- package/skills/android-wear-compose-m3/references/foundation/ScalingLazyColumnSample.kt.md.txt +131 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToDismissBoxSample.kt.md +169 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToDismissBoxSample.kt.md.txt +169 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToRevealSample.kt.md +282 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToRevealSample.kt.md.txt +282 -0
- package/skills/android-wear-compose-m3/references/foundation/TransformingLazyColumnSample.kt.md +335 -0
- package/skills/android-wear-compose-m3/references/foundation/TransformingLazyColumnSample.kt.md.txt +335 -0
- package/skills/android-wear-compose-m3/references/material3/AlertDialogSample.kt.md +377 -0
- package/skills/android-wear-compose-m3/references/material3/AlertDialogSample.kt.md.txt +377 -0
- package/skills/android-wear-compose-m3/references/material3/AnimatedTextSample.kt.md +165 -0
- package/skills/android-wear-compose-m3/references/material3/AnimatedTextSample.kt.md.txt +165 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonGroupSample.kt.md +91 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonGroupSample.kt.md.txt +91 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonSample.kt.md +496 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonSample.kt.md.txt +496 -0
- package/skills/android-wear-compose-m3/references/material3/CardSample.kt.md +470 -0
- package/skills/android-wear-compose-m3/references/material3/CardSample.kt.md.txt +470 -0
- package/skills/android-wear-compose-m3/references/material3/CheckboxButtonSample.kt.md +67 -0
- package/skills/android-wear-compose-m3/references/material3/CheckboxButtonSample.kt.md.txt +67 -0
- package/skills/android-wear-compose-m3/references/material3/ConfirmationDialogSample.kt.md +162 -0
- package/skills/android-wear-compose-m3/references/material3/ConfirmationDialogSample.kt.md.txt +162 -0
- package/skills/android-wear-compose-m3/references/material3/CurvedTextSamples.kt.md +78 -0
- package/skills/android-wear-compose-m3/references/material3/CurvedTextSamples.kt.md.txt +78 -0
- package/skills/android-wear-compose-m3/references/material3/DatePickerSample.kt.md +131 -0
- package/skills/android-wear-compose-m3/references/material3/DatePickerSample.kt.md.txt +131 -0
- package/skills/android-wear-compose-m3/references/material3/DynamicColorSchemeSample.kt.md +74 -0
- package/skills/android-wear-compose-m3/references/material3/DynamicColorSchemeSample.kt.md.txt +74 -0
- package/skills/android-wear-compose-m3/references/material3/EdgeButtonSample.kt.md +63 -0
- package/skills/android-wear-compose-m3/references/material3/EdgeButtonSample.kt.md.txt +63 -0
- package/skills/android-wear-compose-m3/references/material3/FadingExpandingLabelSample.kt.md +60 -0
- package/skills/android-wear-compose-m3/references/material3/FadingExpandingLabelSample.kt.md.txt +60 -0
- package/skills/android-wear-compose-m3/references/material3/IconButtonSample.kt.md +125 -0
- package/skills/android-wear-compose-m3/references/material3/IconButtonSample.kt.md.txt +125 -0
- package/skills/android-wear-compose-m3/references/material3/IconToggleButtonSample.kt.md +116 -0
- package/skills/android-wear-compose-m3/references/material3/IconToggleButtonSample.kt.md.txt +116 -0
- package/skills/android-wear-compose-m3/references/material3/LevelIndicatorSample.kt.md +68 -0
- package/skills/android-wear-compose-m3/references/material3/LevelIndicatorSample.kt.md.txt +68 -0
- package/skills/android-wear-compose-m3/references/material3/LinearProgressIndicatorSample.kt.md +50 -0
- package/skills/android-wear-compose-m3/references/material3/LinearProgressIndicatorSample.kt.md.txt +50 -0
- package/skills/android-wear-compose-m3/references/material3/ListHeaderSample.kt.md +177 -0
- package/skills/android-wear-compose-m3/references/material3/ListHeaderSample.kt.md.txt +177 -0
- package/skills/android-wear-compose-m3/references/material3/OneHandedGestureSamples.kt.md +651 -0
- package/skills/android-wear-compose-m3/references/material3/OneHandedGestureSamples.kt.md.txt +651 -0
- package/skills/android-wear-compose-m3/references/material3/OpenOnPhoneDialogSample.kt.md +57 -0
- package/skills/android-wear-compose-m3/references/material3/OpenOnPhoneDialogSample.kt.md.txt +57 -0
- package/skills/android-wear-compose-m3/references/material3/PageIndicatorSample.kt.md +110 -0
- package/skills/android-wear-compose-m3/references/material3/PageIndicatorSample.kt.md.txt +110 -0
- package/skills/android-wear-compose-m3/references/material3/PagerScaffoldSample.kt.md +204 -0
- package/skills/android-wear-compose-m3/references/material3/PagerScaffoldSample.kt.md.txt +204 -0
- package/skills/android-wear-compose-m3/references/material3/PickerGroupSample.kt.md +139 -0
- package/skills/android-wear-compose-m3/references/material3/PickerGroupSample.kt.md.txt +139 -0
- package/skills/android-wear-compose-m3/references/material3/PickerSample.kt.md +111 -0
- package/skills/android-wear-compose-m3/references/material3/PickerSample.kt.md.txt +111 -0
- package/skills/android-wear-compose-m3/references/material3/PlaceholderSample.kt.md +184 -0
- package/skills/android-wear-compose-m3/references/material3/PlaceholderSample.kt.md.txt +184 -0
- package/skills/android-wear-compose-m3/references/material3/ProgressIndicatorSample.kt.md +263 -0
- package/skills/android-wear-compose-m3/references/material3/ProgressIndicatorSample.kt.md.txt +263 -0
- package/skills/android-wear-compose-m3/references/material3/RadioButtonSample.kt.md +105 -0
- package/skills/android-wear-compose-m3/references/material3/RadioButtonSample.kt.md.txt +105 -0
- package/skills/android-wear-compose-m3/references/material3/ScaffoldSample.kt.md +146 -0
- package/skills/android-wear-compose-m3/references/material3/ScaffoldSample.kt.md.txt +146 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollAwaySample.kt.md +97 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollAwaySample.kt.md.txt +97 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollIndicatorSample.kt.md +66 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollIndicatorSample.kt.md.txt +66 -0
- package/skills/android-wear-compose-m3/references/material3/SliderSample.kt.md +86 -0
- package/skills/android-wear-compose-m3/references/material3/SliderSample.kt.md.txt +86 -0
- package/skills/android-wear-compose-m3/references/material3/StepperSample.kt.md +148 -0
- package/skills/android-wear-compose-m3/references/material3/StepperSample.kt.md.txt +148 -0
- package/skills/android-wear-compose-m3/references/material3/SurfaceTransformationSample.kt.md +166 -0
- package/skills/android-wear-compose-m3/references/material3/SurfaceTransformationSample.kt.md.txt +166 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToDismissBoxSample.kt.md +172 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToDismissBoxSample.kt.md.txt +172 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToRevealSample.kt.md +367 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToRevealSample.kt.md.txt +367 -0
- package/skills/android-wear-compose-m3/references/material3/SwitchButtonSample.kt.md +66 -0
- package/skills/android-wear-compose-m3/references/material3/SwitchButtonSample.kt.md.txt +66 -0
- package/skills/android-wear-compose-m3/references/material3/TextButtonSample.kt.md +115 -0
- package/skills/android-wear-compose-m3/references/material3/TextButtonSample.kt.md.txt +115 -0
- package/skills/android-wear-compose-m3/references/material3/TextToggleButtonSample.kt.md +71 -0
- package/skills/android-wear-compose-m3/references/material3/TextToggleButtonSample.kt.md.txt +71 -0
- package/skills/android-wear-compose-m3/references/material3/TimePickerSample.kt.md +151 -0
- package/skills/android-wear-compose-m3/references/material3/TimePickerSample.kt.md.txt +151 -0
- package/skills/android-wear-compose-m3/references/material3/TimeTextSample.kt.md +65 -0
- package/skills/android-wear-compose-m3/references/material3/TimeTextSample.kt.md.txt +65 -0
- package/skills/android-wear-compose-m3/references/material3/TransformationSpecSample.kt.md +246 -0
- package/skills/android-wear-compose-m3/references/material3/TransformationSpecSample.kt.md.txt +246 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnNotificationsSample.kt.md +89 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnNotificationsSample.kt.md.txt +89 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnSample.kt.md +309 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnSample.kt.md.txt +309 -0
- package/skills/android-wear-compose-m3/references/navigation3/SwipeDismissableSceneStrategySample.kt.md +205 -0
- package/skills/android-wear-compose-m3/references/navigation3/SwipeDismissableSceneStrategySample.kt.md.txt +205 -0
- package/skills/{architecture-feature-first → flutter-architecture-feature-first}/SKILL.md +1 -1
- package/skills/{bloc → flutter-bloc}/SKILL.md +1 -1
- package/skills/flutter-build-debug/SKILL.md +66 -0
- package/skills/{code-review → flutter-code-review}/SKILL.md +1 -1
- package/skills/{dart-3-updates → flutter-dart-3-updates}/SKILL.md +1 -1
- package/skills/{dart-fix-runtime-errors → flutter-dart-fix-runtime-errors}/SKILL.md +1 -1
- package/skills/{dart-resolve-package-conflicts → flutter-dart-resolve-package-conflicts}/SKILL.md +1 -1
- package/skills/{dart-run-static-analysis → flutter-dart-run-static-analysis}/SKILL.md +1 -1
- package/skills/{dart-use-pattern-matching → flutter-dart-use-pattern-matching}/SKILL.md +1 -1
- package/skills/{effective-dart → flutter-effective-dart}/SKILL.md +1 -1
- package/skills/{provider → flutter-provider}/SKILL.md +1 -1
- package/skills/{riverpod → flutter-riverpod}/SKILL.md +1 -1
- package/skills/ios-cocoapods-debug/SKILL.md +65 -0
- package/skills/ios-code-review/SKILL.md +56 -0
- package/skills/ios-xcode-build-debug/SKILL.md +66 -0
- package/skills/{detect-mobile-stack → mobile-detect-stack}/SKILL.md +1 -1
- package/skills/mobile-firebase/SKILL.md +54 -0
- package/skills/mobile-firebase/references/android/ai-logic.md +31 -0
- package/skills/mobile-firebase/references/android/analytics.md +33 -0
- package/skills/mobile-firebase/references/android/app-check.md +36 -0
- package/skills/mobile-firebase/references/android/auth.md +44 -0
- package/skills/mobile-firebase/references/android/crashlytics.md +31 -0
- package/skills/mobile-firebase/references/android/firestore.md +44 -0
- package/skills/mobile-firebase/references/android/functions.md +33 -0
- package/skills/mobile-firebase/references/android/in-app-messaging.md +28 -0
- package/skills/mobile-firebase/references/android/messaging.md +41 -0
- package/skills/mobile-firebase/references/android/realtime-database.md +50 -0
- package/skills/mobile-firebase/references/android/remote-config.md +43 -0
- package/skills/mobile-firebase/references/android/sql-connect.md +31 -0
- package/skills/mobile-firebase/references/android/storage.md +39 -0
- package/skills/mobile-firebase/references/android.md +30 -0
- package/skills/{firebase-ai/SKILL.md → mobile-firebase/references/flutter/ai-logic.md} +2 -8
- package/skills/{firebase-analytics/SKILL.md → mobile-firebase/references/flutter/analytics.md} +2 -8
- package/skills/{firebase-app-check/SKILL.md → mobile-firebase/references/flutter/app-check.md} +2 -8
- package/skills/{firebase-auth/SKILL.md → mobile-firebase/references/flutter/auth.md} +2 -8
- package/skills/{firebase-crashlytics/SKILL.md → mobile-firebase/references/flutter/crashlytics.md} +2 -8
- package/skills/{firebase-cloud-firestore/SKILL.md → mobile-firebase/references/flutter/firestore.md} +2 -8
- package/skills/{firebase-cloud-functions/SKILL.md → mobile-firebase/references/flutter/functions.md} +2 -8
- package/skills/{firebase-in-app-messaging/SKILL.md → mobile-firebase/references/flutter/in-app-messaging.md} +2 -8
- package/skills/{firebase-messaging/SKILL.md → mobile-firebase/references/flutter/messaging.md} +2 -8
- package/skills/{firebase-database/SKILL.md → mobile-firebase/references/flutter/realtime-database.md} +2 -8
- package/skills/{firebase-remote-config/SKILL.md → mobile-firebase/references/flutter/remote-config.md} +2 -8
- package/skills/{flutterfire-configure/SKILL.md → mobile-firebase/references/flutter/setup-flutterfire.md} +1 -8
- package/skills/{firebase-data-connect/SKILL.md → mobile-firebase/references/flutter/sql-connect.md} +2 -8
- package/skills/{firebase-storage/SKILL.md → mobile-firebase/references/flutter/storage.md} +2 -8
- package/skills/mobile-firebase/references/flutter.md +36 -0
- package/skills/mobile-firebase/references/ios/ai-logic.md +30 -0
- package/skills/mobile-firebase/references/ios/analytics.md +33 -0
- package/skills/mobile-firebase/references/ios/app-check.md +36 -0
- package/skills/mobile-firebase/references/ios/auth.md +48 -0
- package/skills/mobile-firebase/references/ios/crashlytics.md +34 -0
- package/skills/mobile-firebase/references/ios/firestore.md +53 -0
- package/skills/mobile-firebase/references/ios/functions.md +35 -0
- package/skills/mobile-firebase/references/ios/in-app-messaging.md +26 -0
- package/skills/mobile-firebase/references/ios/messaging.md +45 -0
- package/skills/mobile-firebase/references/ios/realtime-database.md +49 -0
- package/skills/mobile-firebase/references/ios/remote-config.md +44 -0
- package/skills/mobile-firebase/references/ios/sql-connect.md +33 -0
- package/skills/mobile-firebase/references/ios/storage.md +36 -0
- package/skills/mobile-firebase/references/ios.md +28 -0
- package/skills/mobile-firebase/references/react-native/ai-logic.md +32 -0
- package/skills/mobile-firebase/references/react-native/analytics.md +43 -0
- package/skills/mobile-firebase/references/react-native/app-check.md +35 -0
- package/skills/mobile-firebase/references/react-native/auth.md +50 -0
- package/skills/mobile-firebase/references/react-native/crashlytics.md +36 -0
- package/skills/mobile-firebase/references/react-native/firestore.md +45 -0
- package/skills/mobile-firebase/references/react-native/functions.md +28 -0
- package/skills/mobile-firebase/references/react-native/in-app-messaging.md +27 -0
- package/skills/mobile-firebase/references/react-native/messaging.md +46 -0
- package/skills/mobile-firebase/references/react-native/realtime-database.md +46 -0
- package/skills/mobile-firebase/references/react-native/remote-config.md +32 -0
- package/skills/mobile-firebase/references/react-native/sql-connect.md +11 -0
- package/skills/mobile-firebase/references/react-native/storage.md +30 -0
- package/skills/mobile-firebase/references/react-native.md +29 -0
- package/skills/mobile-test/SKILL.md +63 -0
- package/skills/mobile-test/references/android/setup/GUIDE.md +183 -0
- package/skills/mobile-test/references/android/setup/references/android/develop/ui/compose/testing/common-patterns.md +181 -0
- package/skills/mobile-test/references/android/setup/references/android/studio/preview/compose-screenshot-testing.md +255 -0
- package/skills/mobile-test/references/android/setup/references/android/training/dependency-injection/hilt-testing.md +447 -0
- package/skills/mobile-test/references/android.md +83 -0
- package/skills/{dart-collect-coverage/SKILL.md → mobile-test/references/flutter/coverage.md} +2 -11
- package/skills/{dart-generate-test-mocks/SKILL.md → mobile-test/references/flutter/generate-mocks.md} +2 -11
- package/skills/{flutter-add-integration-test/SKILL.md → mobile-test/references/flutter/integration-tests.md} +2 -11
- package/skills/{dart-migrate-to-checks-package/SKILL.md → mobile-test/references/flutter/migrate-to-checks.md} +2 -13
- package/skills/{mockito/SKILL.md → mobile-test/references/flutter/mockito.md} +1 -8
- package/skills/{mocktail/SKILL.md → mobile-test/references/flutter/mocktail.md} +1 -8
- package/skills/{patrol-e2e-testing/SKILL.md → mobile-test/references/flutter/patrol.md} +1 -8
- package/skills/{testing/SKILL.md → mobile-test/references/flutter/testing-guidelines.md} +1 -8
- package/skills/{dart-add-unit-test/SKILL.md → mobile-test/references/flutter/unit-tests.md} +2 -11
- package/skills/{flutter-add-widget-test/SKILL.md → mobile-test/references/flutter/widget-tests.md} +2 -11
- package/skills/mobile-test/references/flutter.md +44 -0
- package/skills/mobile-test/references/ios.md +79 -0
- package/skills/mobile-test/references/react-native.md +62 -0
- /package/skills/{dart-use-pattern-matching → flutter-dart-use-pattern-matching}/examples/json_patterns.dart +0 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
Specialized instructions for generating Kotlin implementations of AppFunctions,
|
|
2
|
+
handling system-wide configuration, and managing build dependencies.
|
|
3
|
+
|
|
4
|
+
## Instructions
|
|
5
|
+
|
|
6
|
+
### Step 1: Configure Gradle dependencies and KSP
|
|
7
|
+
|
|
8
|
+
Add the following to `build.gradle.kts`. App Functions requires the KSP (Kotlin
|
|
9
|
+
Symbol Processing) plugin.
|
|
10
|
+
|
|
11
|
+
1. **Version check** : Use library version `1.0.0-alpha10` or later from maven.google.com.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
```kotlin
|
|
15
|
+
implementation(libs.androidx.appfunctions)
|
|
16
|
+
ksp(libs.androidx.appfunctions.compiler)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
<br />
|
|
20
|
+
|
|
21
|
+
<br />
|
|
22
|
+
|
|
23
|
+
<br />
|
|
24
|
+
|
|
25
|
+
### Step 2: Set up app metadata XML
|
|
26
|
+
|
|
27
|
+
Describe the app's capabilities to the LLM by defining
|
|
28
|
+
`res/xml/app_metadata.xml`.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
```xml
|
|
32
|
+
<AppFunctionAppMetadata xmlns:appfn="http://schemas.android.com/apk/androidx.appfunctions"
|
|
33
|
+
appfn:description="This app manages user tasks and reminders.
|
|
34
|
+
Operational Patterns:
|
|
35
|
+
- Use 'createTask' to add new tasks or reminders with titles and content.
|
|
36
|
+
Constraints:
|
|
37
|
+
- Title or content must be non-null when creating a task."
|
|
38
|
+
appfn:displayDescription="@string/user_visible_description" />
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
<br />
|
|
42
|
+
|
|
43
|
+
Register the service and reference the app metadata in `AndroidManifest.xml`
|
|
44
|
+
within the `<application>` tag:
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
```xml
|
|
48
|
+
<service
|
|
49
|
+
android:name="com.example.snippets.ai.TaskAppFunctionService"
|
|
50
|
+
android:permission="android.permission.BIND_APP_FUNCTION_SERVICE"
|
|
51
|
+
android:exported="true"
|
|
52
|
+
tools:targetApi="36">
|
|
53
|
+
<property
|
|
54
|
+
android:name="android.app.appfunctions.schema"
|
|
55
|
+
android:value="app_functions_schema.xsd" />
|
|
56
|
+
<property
|
|
57
|
+
android:name="android.app.appfunctions.v2"
|
|
58
|
+
android:value="task_app_function_service.xml" />
|
|
59
|
+
<intent-filter>
|
|
60
|
+
<action android:name="android.app.appfunctions.AppFunctionService" />
|
|
61
|
+
</intent-filter>
|
|
62
|
+
</service>
|
|
63
|
+
<property
|
|
64
|
+
android:name="android.app.appfunctions.app_metadata"
|
|
65
|
+
android:resource="@xml/app_metadata" />
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
<br />
|
|
69
|
+
|
|
70
|
+
### Step 3: Implement functions
|
|
71
|
+
|
|
72
|
+
When generating Kotlin code for AppFunctions, you MUST adhere to these rules:
|
|
73
|
+
|
|
74
|
+
1. **Annotations** :
|
|
75
|
+
- Annotate the function with `@AppFunction(isDescribedByKDoc = true)`.
|
|
76
|
+
- Annotate associated data classes with `@AppFunctionSerializable(isDescribedByKDoc = true)`.
|
|
77
|
+
2. **Parameter strategy** :
|
|
78
|
+
- **Specificity**: Keep parameters specific. State objects must be unambiguous.
|
|
79
|
+
- **Optionality**: If a parameter isn't essential, make it optional with a default value.
|
|
80
|
+
3. **Execution and threading** :
|
|
81
|
+
- Use `suspend` functions.
|
|
82
|
+
- To avoid blocking the Android UI thread, always run AppFunction implementations on a background dispatcher, such as `withContext(Dispatchers.IO)`.
|
|
83
|
+
4. **Supported types** :
|
|
84
|
+
- **Primitives** : `Int`, `Long`, `Float`, `Double`, `Boolean`
|
|
85
|
+
- **Arrays** : `IntArray`, `LongArray`, `FloatArray`, `DoubleArray`, `BooleanArray`
|
|
86
|
+
- **Native types** : `String`, `PendingIntent`, `Uri`, `LocalTime`, `LocalDate`, `LocalDateTime`, `Instant`. Prefer using `LocalDateTime` or `Instant` for date and time fields.
|
|
87
|
+
- **Custom objects** : Classes annotated with `@AppFunctionSerializable`.
|
|
88
|
+
- **Collections** : `List` of any supported non-primitive type
|
|
89
|
+
5. **Default values** :
|
|
90
|
+
- Use defaults that align with the type's empty state, such as `0` for `Int`, `null` for nullable objects, and `emptyList()` for `List`.
|
|
91
|
+
6. **Error handling** :
|
|
92
|
+
- Throw subclasses of `androidx.appfunctions.AppFunctionException` to report errors to callers.
|
|
93
|
+
7. **Security** :
|
|
94
|
+
- Don't expose highly sensitive user data, such as passwords or financial details.
|
|
95
|
+
- Don't expose irreversible destructive actions without confirmation steps.
|
|
96
|
+
|
|
97
|
+
### Step 4: Set up dependency injection and service entry points
|
|
98
|
+
|
|
99
|
+
In version 1.0.0-alpha10 and later, App Functions use the compile-time
|
|
100
|
+
`@AppFunctionServiceEntryPoint` architecture. Create an abstract class extending
|
|
101
|
+
`AppFunctionService` annotated with `@AppFunctionServiceEntryPoint`. KSP
|
|
102
|
+
generates the concrete service class and XML schema.
|
|
103
|
+
|
|
104
|
+
#### Recommended approach with Hilt
|
|
105
|
+
|
|
106
|
+
Annotate your service with `@AndroidEntryPoint` and inject your data
|
|
107
|
+
repositories or use cases using standard `@Inject internal lateinit var`:
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
```kotlin
|
|
111
|
+
@RequiresApi(36)
|
|
112
|
+
@AndroidEntryPoint
|
|
113
|
+
@AppFunctionServiceEntryPoint(
|
|
114
|
+
serviceName = "ConfigAppFunctionServiceHeader",
|
|
115
|
+
appFunctionXmlFileName = "config_app_function_service_header",
|
|
116
|
+
)
|
|
117
|
+
abstract class BaseAppFunctionServiceHeader : AppFunctionService() {
|
|
118
|
+
@Inject internal lateinit var messageRepository: MessageRepository
|
|
119
|
+
|
|
120
|
+
@AppFunction(isDescribedByKDoc = true)
|
|
121
|
+
internal suspend fun send(
|
|
122
|
+
name: String,
|
|
123
|
+
endpointValue: String,
|
|
124
|
+
messageBody: String,
|
|
125
|
+
): MessageResult {
|
|
126
|
+
return messageRepository.send(name, endpointValue, messageBody)
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
<br />
|
|
132
|
+
|
|
133
|
+
#### Framework-agnostic approach with alternative dependency injection or service locators
|
|
134
|
+
|
|
135
|
+
While Hilt is recommended, many Android applications implement AppFunctions with
|
|
136
|
+
alternative dependency injection frameworks (like Koin, Anvil, or manual Service
|
|
137
|
+
Locators). Because `AppFunctionService` inherits from Android
|
|
138
|
+
`android.app.Service` (and therefore `Context`), you are able access your
|
|
139
|
+
application's DI container directly through `applicationContext` in property
|
|
140
|
+
getters or during service lifecycle execution:
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
```kotlin
|
|
144
|
+
@RequiresApi(36)
|
|
145
|
+
@AppFunctionServiceEntryPoint(
|
|
146
|
+
serviceName = "ServiceLocatorConfigAppFunctionService",
|
|
147
|
+
appFunctionXmlFileName = "service_locator_config_app_function_service",
|
|
148
|
+
)
|
|
149
|
+
abstract class BaseAppFunctionServiceLocator : AppFunctionService() {
|
|
150
|
+
// Example using a manual Service Locator / Application container
|
|
151
|
+
private val messageRepository by lazy {
|
|
152
|
+
(applicationContext as AppFunctionApplication).appContainer.messageRepository
|
|
153
|
+
}
|
|
154
|
+
// Or with Koin / alternative DI locators:
|
|
155
|
+
// private val messageRepository: MessageRepository by inject()
|
|
156
|
+
|
|
157
|
+
@AppFunction(isDescribedByKDoc = true)
|
|
158
|
+
internal suspend fun send(
|
|
159
|
+
name: String,
|
|
160
|
+
endpointValue: String,
|
|
161
|
+
messageBody: String,
|
|
162
|
+
): MessageResult {
|
|
163
|
+
return messageRepository.send(name, endpointValue, messageBody)
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
<br />
|
|
169
|
+
|
|
170
|
+
### Step 5: Architectural cleanliness
|
|
171
|
+
|
|
172
|
+
Don't attempt to make an `AppFunction` class or method OS-agnostic---App Functions are inherently part of the Android platform integration in `androidx.appfunctions`. For architectural cleanliness, use existing
|
|
173
|
+
application functionality (such as existing repositories, use cases, or domain
|
|
174
|
+
orchestrators) to execute the behavior within your `@AppFunction` methods rather
|
|
175
|
+
than creating redundant abstraction layers around the OS service.
|
|
176
|
+
|
|
177
|
+
<br />
|
|
178
|
+
|
|
179
|
+
## Critical constraints
|
|
180
|
+
|
|
181
|
+
### KSP compliance for serializables
|
|
182
|
+
|
|
183
|
+
**Critical constraints** : For `@AppFunctionSerializable` data classes, KSP
|
|
184
|
+
only extracts documentation if it's written as inline KDoc directly for each
|
|
185
|
+
property definition. Don't use class-level `@param` or `@property` tags.
|
|
186
|
+
|
|
187
|
+
### Package integrity
|
|
188
|
+
|
|
189
|
+
Configuration APIs and the `@AppFunction` annotation are located in
|
|
190
|
+
`androidx.appfunctions`.
|
|
191
|
+
|
|
192
|
+
## Examples
|
|
193
|
+
|
|
194
|
+
### Example: Serializable with inline KDoc
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
```kotlin
|
|
198
|
+
/** The parameter to create the task. */
|
|
199
|
+
@AppFunctionSerializable(isDescribedByKDoc = true)
|
|
200
|
+
data class CreateTaskParams(
|
|
201
|
+
/** The title of the task. */
|
|
202
|
+
val title: String?,
|
|
203
|
+
/** The content of the task. */
|
|
204
|
+
val content: String?,
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
/** The user-created task. */
|
|
208
|
+
@AppFunctionSerializable(isDescribedByKDoc = true)
|
|
209
|
+
data class Task(
|
|
210
|
+
/** The ID of the task. */
|
|
211
|
+
val id: String,
|
|
212
|
+
/** The title of the task. */
|
|
213
|
+
val title: String,
|
|
214
|
+
/** The content of the task. */
|
|
215
|
+
val content: String,
|
|
216
|
+
)
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
<br />
|
|
220
|
+
|
|
221
|
+
<br />
|
|
222
|
+
|
|
223
|
+
### Example: Implementation detail
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
```kotlin
|
|
227
|
+
@RequiresApi(36)
|
|
228
|
+
@AndroidEntryPoint
|
|
229
|
+
@AppFunctionServiceEntryPoint(
|
|
230
|
+
serviceName = "TaskAppFunctionService",
|
|
231
|
+
appFunctionXmlFileName = "task_app_function_service",
|
|
232
|
+
)
|
|
233
|
+
abstract class BaseTaskAppFunctionService : AppFunctionService() {
|
|
234
|
+
@Inject internal lateinit var taskRepository: TaskRepository
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Creates a task based on [createTaskParams].
|
|
238
|
+
*
|
|
239
|
+
* @param createTaskParams The parameter to describe how to create the task.
|
|
240
|
+
*/
|
|
241
|
+
@AppFunction(isDescribedByKDoc = true)
|
|
242
|
+
suspend fun createTask(
|
|
243
|
+
createTaskParams: CreateTaskParams,
|
|
244
|
+
): Task = withContext(Dispatchers.IO) {
|
|
245
|
+
// Developers can use predefined exceptions to let the agent know
|
|
246
|
+
// why it failed.
|
|
247
|
+
if (createTaskParams.title == null && createTaskParams.content == null) {
|
|
248
|
+
throw AppFunctionInvalidArgumentException("Title or content should be non-null")
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
val id = taskRepository.createTask(
|
|
252
|
+
createTaskParams.title,
|
|
253
|
+
createTaskParams.content
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
return@withContext taskRepository
|
|
257
|
+
.getTask(id)
|
|
258
|
+
?.toTask()
|
|
259
|
+
?: throw AppFunctionElementNotFoundException("Task not found for ID = $id")
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Maps internal TaskEntity
|
|
263
|
+
private fun TaskEntity.toTask() = Task(id = id, title = title, content = description)
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
<br />
|
|
268
|
+
|
|
269
|
+
<br />
|
|
270
|
+
|
|
271
|
+
## Troubleshooting
|
|
272
|
+
|
|
273
|
+
### Error: "AppFunction unavailable" or "Metadata missing"
|
|
274
|
+
|
|
275
|
+
**Cause**: The AppSearch indexing failed to extract the schema correctly.
|
|
276
|
+
|
|
277
|
+
**Solution**:
|
|
278
|
+
|
|
279
|
+
1. Verify `@AppFunctionSerializable` classes use inline KDoc comments, not class-level `@param` tags.
|
|
280
|
+
2. Check that the `assets/<appFunctionXmlFileName>.xml` file exists in the APK.
|
|
281
|
+
3. Confirm the `ksp("androidx.appfunctions:appfunctions-compiler")` dependency is correctly applied.
|
|
282
|
+
4. Ensure the `ksp` argument `appfunctions:aggregateAppFunctions` is set to `"true"`.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
Optimizes AppFunction KDoc for AI agents and Model Context Protocol.
|
|
2
|
+
|
|
3
|
+
## Instructions
|
|
4
|
+
|
|
5
|
+
### Workflow: Agent-centric documentation
|
|
6
|
+
|
|
7
|
+
1. **Identify the core outcome** : Start the description with a strong imperative verb, for example, "Search", "Create", or "Update". Focus on the *user benefit*, not the code implementation.
|
|
8
|
+
2. **Workflow dependencies** : Explicitly state if another function must be called first using the standard phrase: **Required workflow: Call "Function
|
|
9
|
+
A" first to "Objective"**.
|
|
10
|
+
3. **Parameter documentation** :
|
|
11
|
+
- For **functions** : Use specific `@param` tags. Isolate validation rules and default values here.
|
|
12
|
+
- For **serializables** : Use inline KDoc directly for each property declaration. KSP **won't** extract documentation from class-level tags.
|
|
13
|
+
4. **Error surface mapping** : Rewrite `@throws` descriptions to provide useful recovery steps for the AI agent, for example "If "Error", suggest the user check their internet connection."
|
|
14
|
+
|
|
15
|
+
### Workflow: Global app description for server instructions
|
|
16
|
+
|
|
17
|
+
When writing the `appfn:description` for `app_metadata.xml`, follow these
|
|
18
|
+
instructions:
|
|
19
|
+
|
|
20
|
+
1. **Capture cross-function relationships**: Explain dependencies or sequences between tools, for example, "Always call 'authenticate' before fetching data.".
|
|
21
|
+
2. **Document operational patterns**: Guide the LLM on token-conserving usage, for example, "Use 'batch_update' over multiple 'update' calls."
|
|
22
|
+
3. **Specify constraints**: Define clear boundaries, for example, "File operations limited to workspace" or "Rate limit: 10 requests per minute."
|
|
23
|
+
4. **Anti-patterns** :
|
|
24
|
+
- Don't repeat individual function descriptions.
|
|
25
|
+
- Don't include marketing claims or subjective praise.
|
|
26
|
+
- Don't attempt to prompt model personality or conversation style.
|
|
27
|
+
|
|
28
|
+
## Critical constraints
|
|
29
|
+
|
|
30
|
+
### Descriptive, not imperative
|
|
31
|
+
|
|
32
|
+
Describe what the function *does* , not what the LLM *must* do. Avoid phrases
|
|
33
|
+
like "You must call this..." in favor of "This function provides...".
|
|
34
|
+
|
|
35
|
+
### No "fluff"
|
|
36
|
+
|
|
37
|
+
Remove conversational padding like "This method is used to..." or "Helpful
|
|
38
|
+
for...". Be concise and technical.
|
|
39
|
+
|
|
40
|
+
### Inline KDoc for serializables
|
|
41
|
+
|
|
42
|
+
**Mandatory** : For `@AppFunctionSerializable` classes, documentation must be
|
|
43
|
+
inline for each property. KSP ignores class-level `@param` or `@property` tags
|
|
44
|
+
for these classes.
|
|
45
|
+
|
|
46
|
+
## Examples
|
|
47
|
+
|
|
48
|
+
### Example: MCP refactoring
|
|
49
|
+
|
|
50
|
+
**Original**:
|
|
51
|
+
|
|
52
|
+
`/** This function helps you find people. */`
|
|
53
|
+
|
|
54
|
+
**Refined**:
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Search for message recipients by name or email.
|
|
58
|
+
* Required workflow: Call this before "sendMessage" to obtain valid recipient IDs.
|
|
59
|
+
* @param query Search string for name/email. If null, returns 3 most recent contacts.
|
|
60
|
+
* @return List of "Recipient" objects matching the query.
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
### Example: Global app description
|
|
64
|
+
|
|
65
|
+
**Refined**:
|
|
66
|
+
|
|
67
|
+
This app provides functions for task management and team collaboration.
|
|
68
|
+
|
|
69
|
+
Operational Patterns:
|
|
70
|
+
- Always use 'searchUsers' to resolve user handles to internal IDs before calling 'assignTask'.
|
|
71
|
+
- Prefer 'batchUpdateStatus' when modifying more than three tasks simultaneously to reduce latency.
|
|
72
|
+
|
|
73
|
+
Constraints:
|
|
74
|
+
- Task titles are limited to 100 characters.
|
|
75
|
+
- Attachment uploads are limited to 5 MB.
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
Follow this systematic procedure to migrate Android applications that use the
|
|
2
|
+
AppFunctions API in version 1.0.0-alpha09 and lower to the compile-time
|
|
3
|
+
`@AppFunctionServiceEntryPoint` architecture introduced in version
|
|
4
|
+
`1.0.0-alpha10`.
|
|
5
|
+
|
|
6
|
+
*** ** * ** ***
|
|
7
|
+
|
|
8
|
+
## Architectural shift overview
|
|
9
|
+
|
|
10
|
+
In lower versions of the AppFunctions API, for example version `1.0.0-alpha09`:
|
|
11
|
+
|
|
12
|
+
- Applications require separate dependencies for core functionality, specifically `androidx.appfunctions:appfunctions`, and service components, specifically `androidx.appfunctions:appfunctions-service`.
|
|
13
|
+
- The application implements `AppFunctionConfiguration.Provider` on its `Application` class.
|
|
14
|
+
- You manually register enclosing class instantiation using `AppFunctionConfiguration.Builder().addEnclosingClassFactory(...)`.
|
|
15
|
+
- You place metadata property tags directly under `<application>`.
|
|
16
|
+
|
|
17
|
+
In version `1.0.0-alpha10` featuring `@AppFunctionServiceEntryPoint`:
|
|
18
|
+
|
|
19
|
+
- The core and service dependencies are consolidated into a single runtime artifact, `androidx.appfunctions:appfunctions`, which eliminates the need for the standalone `appfunctions-service` library.
|
|
20
|
+
- A dedicated wrapper class extending `AppFunctionService` is annotated with `@AppFunctionServiceEntryPoint` and Hilt's `@AndroidEntryPoint` or an alternative dependency injection framework.
|
|
21
|
+
- The KSP compiler generates a concrete service subclass and an XML metadata schema file in `assets/`.
|
|
22
|
+
- The OS discovers and routes executions using a consolidated `<service>` and `app_metadata` declaration in `AndroidManifest.xml`.
|
|
23
|
+
|
|
24
|
+
### Strict migration requirements from 1.0.0-alpha09 to 1.0.0-alpha10
|
|
25
|
+
|
|
26
|
+
When focusing solely on the mandatory API changes required by the new
|
|
27
|
+
`@AppFunctionServiceEntryPoint` architecture, the migration consists of four
|
|
28
|
+
strict requirements that you must complete:
|
|
29
|
+
|
|
30
|
+
1. **Build dependency consolidation** : Remove the merged `appfunctions-service` dependency while retaining core `appfunctions` and the KSP compiler.
|
|
31
|
+
2. **Service wrapper creation** : Replace the legacy `AppFunctionConfiguration.Provider` on the `Application` class with an abstract class extending `AppFunctionService`, annotated with `@AppFunctionServiceEntryPoint`.
|
|
32
|
+
3. **Annotation and context decoupling** : Move `@AppFunction` annotations to the new wrapper methods and drop `AppFunctionContext` parameters because `AppFunctionService` inherits directly from `Context`.
|
|
33
|
+
4. **Manifest registration** : Register the KSP-generated concrete service in `AndroidManifest.xml` with `BIND_APP_FUNCTION_SERVICE`, the `AppFunctionService` intent filter, and metadata property tags.
|
|
34
|
+
|
|
35
|
+
*** ** * ** ***
|
|
36
|
+
|
|
37
|
+
## Systematic migration steps
|
|
38
|
+
|
|
39
|
+
### Consolidate AppFunctions build dependencies
|
|
40
|
+
|
|
41
|
+
Remove the standalone `appfunctions-service` library from your module build
|
|
42
|
+
files like `build.gradle.kts` and version catalog like `libs.versions.toml`. In
|
|
43
|
+
version `1.0.0-alpha10`, all core service capabilities are consolidated directly
|
|
44
|
+
within the main `appfunctions` artifact.
|
|
45
|
+
|
|
46
|
+
// build.gradle.kts
|
|
47
|
+
dependencies {
|
|
48
|
+
implementation(libs.androidx.appfunctions)
|
|
49
|
+
- implementation(libs.androidx.appfunctions.service)
|
|
50
|
+
ksp(libs.androidx.appfunctions.compiler)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
# libs.versions.toml
|
|
54
|
+
[versions]
|
|
55
|
+
appfunctions = "1.0.0-alpha10"
|
|
56
|
+
|
|
57
|
+
[libraries]
|
|
58
|
+
androidx-appfunctions = { module = "androidx.appfunctions:appfunctions", version.ref = "appfunctions" }
|
|
59
|
+
- androidx-appfunctions-service = { module = "androidx.appfunctions:appfunctions-service", version.ref = "appfunctions" }
|
|
60
|
+
androidx-appfunctions-compiler = { module = "androidx.appfunctions:appfunctions-compiler", version.ref = "appfunctions" }
|
|
61
|
+
|
|
62
|
+
> [!NOTE]
|
|
63
|
+
> **Note:** If another dependency in your project uses snapshot builds like `1.0.0-SNAPSHOT` or custom snapshot repositories from `https://androidx.dev/snapshots/...`, preserve your custom snapshot repository configuration in `settings.gradle.kts`. Otherwise, standard Google Maven repositories resolve `1.0.0-alpha10` directly.
|
|
64
|
+
|
|
65
|
+
*** ** * ** ***
|
|
66
|
+
|
|
67
|
+
### Create a dedicated wrapper service extending `AppFunctionService`
|
|
68
|
+
|
|
69
|
+
Instead of annotating standalone business logic classes or implementing manual
|
|
70
|
+
configuration providers, create an abstract service wrapper across your project,
|
|
71
|
+
for example `BaseAppFunctionService`, extending `AppFunctionService` and
|
|
72
|
+
annotated with `@AppFunctionServiceEntryPoint`.
|
|
73
|
+
|
|
74
|
+
#### Recommended approach using Hilt
|
|
75
|
+
|
|
76
|
+
Annotate your service with `@AndroidEntryPoint` and inject your data
|
|
77
|
+
repositories or use cases using standard `@Inject internal lateinit var`:
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
```kotlin
|
|
81
|
+
@RequiresApi(36)
|
|
82
|
+
@AndroidEntryPoint
|
|
83
|
+
@AppFunctionServiceEntryPoint(
|
|
84
|
+
serviceName = "MyAppFunctionService",
|
|
85
|
+
appFunctionXmlFileName = "my_app_function_service", // Do NOT include .xml extension
|
|
86
|
+
)
|
|
87
|
+
abstract class BaseAppFunctionService : AppFunctionService() {
|
|
88
|
+
@Inject internal lateinit var messageRepository: MessageRepository
|
|
89
|
+
|
|
90
|
+
@AppFunction(isDescribedByKDoc = true)
|
|
91
|
+
internal suspend fun send(
|
|
92
|
+
name: String,
|
|
93
|
+
endpointValue: String,
|
|
94
|
+
messageBody: String,
|
|
95
|
+
): MessageResult {
|
|
96
|
+
return messageRepository.send(name, endpointValue, messageBody)
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
<br />
|
|
102
|
+
|
|
103
|
+
#### Framework-agnostic approach using alternative dependency injection or a service locator
|
|
104
|
+
|
|
105
|
+
While Hilt is recommended, many Android applications implement AppFunctions with
|
|
106
|
+
alternative dependency injection frameworks like Koin, Anvil, or manual Service
|
|
107
|
+
Locators. Because `AppFunctionService` inherits from Android
|
|
108
|
+
`android.app.Service` and therefore `Context`, you are able access your
|
|
109
|
+
application's DI container directly through `applicationContext` in property
|
|
110
|
+
getters or during service lifecycle execution:
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
```kotlin
|
|
114
|
+
@RequiresApi(36)
|
|
115
|
+
@AppFunctionServiceEntryPoint(
|
|
116
|
+
serviceName = "ServiceLocatorMyAppFunctionService",
|
|
117
|
+
appFunctionXmlFileName = "service_locator_my_app_function_service",
|
|
118
|
+
)
|
|
119
|
+
abstract class ServiceLocatorBaseAppFunctionService : AppFunctionService() {
|
|
120
|
+
// Example using a manual Service Locator or Application container
|
|
121
|
+
private val messageRepository by lazy {
|
|
122
|
+
(applicationContext as AppFunctionApplication).appContainer.messageRepository
|
|
123
|
+
}
|
|
124
|
+
// Or with Koin / alternative DI locators:
|
|
125
|
+
// private val messageRepository: MessageRepository by inject()
|
|
126
|
+
|
|
127
|
+
@AppFunction(isDescribedByKDoc = true)
|
|
128
|
+
internal suspend fun send(
|
|
129
|
+
name: String,
|
|
130
|
+
endpointValue: String,
|
|
131
|
+
messageBody: String,
|
|
132
|
+
): MessageResult {
|
|
133
|
+
return messageRepository.send(name, endpointValue, messageBody)
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
<br />
|
|
139
|
+
|
|
140
|
+
> [!IMPORTANT]
|
|
141
|
+
> **Important:** The `appFunctionXmlFileName` parameter, for example `"my_app_function_service"`, mustn't include the `.xml` extension, as the KSP compiler automatically appends `.xml`. Passing `"my_app_function_service.xml"` results in the asset being named `"my_app_function_service.xml.xml"`.
|
|
142
|
+
|
|
143
|
+
*** ** * ** ***
|
|
144
|
+
|
|
145
|
+
### Simplify method signatures and decouple context
|
|
146
|
+
|
|
147
|
+
Remove legacy `AppFunctionContext` parameters from your core methods. When a
|
|
148
|
+
method requires an Android `Context`, for example when constructing a
|
|
149
|
+
`PendingIntent`, access `this` directly from your `AppFunctionService` wrapper
|
|
150
|
+
because the wrapper inherently extends `android.content.Context`.
|
|
151
|
+
|
|
152
|
+
- suspend fun makeCall(appFunctionContext: AppFunctionContext, contactName: String?): PendingIntent
|
|
153
|
+
+ suspend fun makeCall(contactName: String?): PendingIntent
|
|
154
|
+
|
|
155
|
+
*** ** * ** ***
|
|
156
|
+
|
|
157
|
+
### Remove legacy configuration provider
|
|
158
|
+
|
|
159
|
+
Update your `Application` class by removing
|
|
160
|
+
`AppFunctionConfiguration.Provider` and its associated builder entry points:
|
|
161
|
+
|
|
162
|
+
- abstract class BaseChatApplication : Application(), AppFunctionConfiguration.Provider { ... }
|
|
163
|
+
+ abstract class BaseChatApplication : Application()
|
|
164
|
+
|
|
165
|
+
*** ** * ** ***
|
|
166
|
+
|
|
167
|
+
### Avoid redundant abstraction layers
|
|
168
|
+
|
|
169
|
+
Don't attempt to make an `AppFunction` class or method OS-agnostic---AppFunctions
|
|
170
|
+
are inherently part of the Android platform integration through the
|
|
171
|
+
`androidx.appfunctions` package. For architectural cleanliness, use existing
|
|
172
|
+
application functionality, such as existing repositories, use cases, or domain
|
|
173
|
+
orchestrators, to execute the behavior within your `@AppFunction` methods rather
|
|
174
|
+
than creating redundant abstraction layers around the OS service.
|
|
175
|
+
|
|
176
|
+
*** ** * ** ***
|
|
177
|
+
|
|
178
|
+
### Consolidate service and metadata manifest declarations
|
|
179
|
+
|
|
180
|
+
Register the KSP-generated service declaration and `app_metadata` property
|
|
181
|
+
inside your module manifest, for example in `src/main/AndroidManifest.xml`
|
|
182
|
+
within the `<application>` tag:
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
```xml
|
|
186
|
+
<service
|
|
187
|
+
android:name="com.example.snippets.ai.MyAppFunctionService"
|
|
188
|
+
android:permission="android.permission.BIND_APP_FUNCTION_SERVICE"
|
|
189
|
+
android:exported="true"
|
|
190
|
+
tools:targetApi="36">
|
|
191
|
+
<property
|
|
192
|
+
android:name="android.app.appfunctions.schema"
|
|
193
|
+
android:value="app_functions_schema.xsd" />
|
|
194
|
+
<property
|
|
195
|
+
android:name="android.app.appfunctions.v2"
|
|
196
|
+
android:value="my_app_function_service.xml" />
|
|
197
|
+
<intent-filter>
|
|
198
|
+
<action android:name="android.app.appfunctions.AppFunctionService" />
|
|
199
|
+
</intent-filter>
|
|
200
|
+
</service>
|
|
201
|
+
<property
|
|
202
|
+
android:name="android.app.appfunctions.app_metadata"
|
|
203
|
+
android:resource="@xml/app_metadata" />
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
<br />
|
|
207
|
+
|
|
208
|
+
*** ** * ** ***
|
|
209
|
+
|
|
210
|
+
## Verification and troubleshooting
|
|
211
|
+
|
|
212
|
+
1. **Clean rebuild and deploy** : `bash
|
|
213
|
+
./gradlew clean installDebug`
|
|
214
|
+
2. **Verify AppSearch discovery / indexing** : Run the following ADB command to
|
|
215
|
+
confirm the OS successfully discovered and indexed your functions:
|
|
216
|
+
`bash
|
|
217
|
+
adb shell cmd app_function list-app-functions`
|
|
218
|
+
*If your package doesn't appear, confirm that `android.app.appfunctions.v2`
|
|
219
|
+
matches the exact asset name generated in `assets/`.*
|
|
220
|
+
|
|
221
|
+
3. **Verify execution using ADB** :
|
|
222
|
+
`bash
|
|
223
|
+
adb shell "cmd app_function execute-app-function \
|
|
224
|
+
--package com.example.chatapp \
|
|
225
|
+
--function 'com.example.chatapp.appfunctions.BaseAppFunctionService#send' \
|
|
226
|
+
--parameters '{\"name\": \"Alice\", \"endpointValue\": \"1\", \"messageBody\": \"Hello Alice!\"}'"`
|