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.
Files changed (463) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +24 -0
  4. package/README.md +175 -168
  5. package/THIRD_PARTY_NOTICES.md +224 -4
  6. package/agents/android-architect.md +89 -0
  7. package/agents/android-performance-engineer.md +92 -0
  8. package/agents/android-test-engineer.md +97 -0
  9. package/agents/flutter-test-engineer.md +2 -0
  10. package/agents/ios-architect.md +93 -0
  11. package/agents/ios-performance-engineer.md +92 -0
  12. package/agents/ios-test-engineer.md +95 -0
  13. package/agents/lead-mobile.md +10 -1
  14. package/agents/mobile-staff-engineer.md +1 -1
  15. package/agents/rn-architect.md +94 -0
  16. package/agents/rn-performance-engineer.md +92 -0
  17. package/agents/rn-test-engineer.md +98 -0
  18. package/bin/reis-mobile.mjs +59 -17
  19. package/commands/debate.md +10 -1
  20. package/commands/debug.md +60 -0
  21. package/commands/reis-mobile.md +7 -2
  22. package/core/config/project.mjs +59 -0
  23. package/core/registry/frontmatter.mjs +15 -4
  24. package/core/registry/registry.mjs +21 -1
  25. package/core/router/intents.mjs +2 -0
  26. package/core/router/router.mjs +10 -5
  27. package/package.json +1 -1
  28. package/skills/android-adaptive/SKILL.md +304 -0
  29. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/container-behavior.md +112 -0
  30. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/get-started.md +69 -0
  31. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/index.md +81 -0
  32. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/item-behavior.md +170 -0
  33. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/container-properties.md +415 -0
  34. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/get-started.md +51 -0
  35. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/index.md +73 -0
  36. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/item-properties.md +170 -0
  37. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/mediaquery/index.md +333 -0
  38. package/skills/android-adaptive/references/android/develop/ui/compose/tooling/debug.md +114 -0
  39. package/skills/android-adaptive/references/android/guide/navigation/navigation-3/recipes/material-listdetail.md +141 -0
  40. package/skills/android-agp-9-upgrade/SKILL.md +106 -0
  41. package/skills/android-agp-9-upgrade/references/android/build/migrate-to-built-in-kotlin.md +416 -0
  42. package/skills/android-agp-9-upgrade/references/android/build/releases/agp-9-0-0-release-notes.md +554 -0
  43. package/skills/android-agp-9-upgrade/references/buildconfig.md +54 -0
  44. package/skills/android-agp-9-upgrade/references/ksp-kapt.md +39 -0
  45. package/skills/android-agp-9-upgrade/references/paparazzi-gradle-9.md +30 -0
  46. package/skills/android-agp-9-upgrade/references/recipes.md +62 -0
  47. package/skills/android-appfunctions/SKILL.md +74 -0
  48. package/skills/android-appfunctions/references/adb-interaction-testing.md +95 -0
  49. package/skills/android-appfunctions/references/context.md +26 -0
  50. package/skills/android-appfunctions/references/feature-discovery-analysis.md +71 -0
  51. package/skills/android-appfunctions/references/implementation-configuration.md +282 -0
  52. package/skills/android-appfunctions/references/kdoc-refinement-optimization.md +75 -0
  53. package/skills/android-appfunctions/references/migrate-to-service-entry-point.md +226 -0
  54. package/skills/android-camerax/SKILL.md +135 -0
  55. package/skills/android-camerax/references/camera1-to-camerax.md +198 -0
  56. package/skills/android-camerax/references/camera2-to-camerax.md +193 -0
  57. package/skills/android-camerax/references/expert-blueprints.md +58 -0
  58. package/skills/android-camerax/references/foldables.md +83 -0
  59. package/skills/android-camerax/references/immutability.md +60 -0
  60. package/skills/android-camerax/references/low-light.md +124 -0
  61. package/skills/android-camerax/references/mlkit-spatial.md +75 -0
  62. package/skills/android-camerax/references/modern-apis.md +42 -0
  63. package/skills/android-camerax/references/testing.md +69 -0
  64. package/skills/android-camerax/references/thermals.md +85 -0
  65. package/skills/android-camerax/references/wear-os.md +76 -0
  66. package/skills/android-camerax/references/xr.md +54 -0
  67. package/skills/android-cli/SKILL.md +474 -0
  68. package/skills/android-cli/references/interact.md +113 -0
  69. package/skills/android-cli/references/journeys.md +120 -0
  70. package/skills/android-code-review/SKILL.md +58 -0
  71. package/skills/android-display-glasses-with-jetpack-compose-glimmer/SKILL.md +340 -0
  72. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/design/ui/ai-glasses/guides/interaction/inputs.md +67 -0
  73. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/access-hardware-projected-context.md +388 -0
  74. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/buttons.md +139 -0
  75. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/cards.md +148 -0
  76. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/focus.md +107 -0
  77. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/icons.md +90 -0
  78. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/text.md +69 -0
  79. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/title-chips.md +82 -0
  80. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/request-hardware-permissions.md +213 -0
  81. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/button-samples-source.md +176 -0
  82. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/button-source.md +203 -0
  83. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/card-samples-source.md +296 -0
  84. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/card-source.md +515 -0
  85. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/deptheffect-source.md +224 -0
  86. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/deptheffectlevels-source.md +105 -0
  87. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/glimmersansflextypography-source.md +270 -0
  88. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/glimmertheme-source.md +182 -0
  89. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/icon-source.md +388 -0
  90. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/iconbutton-source.md +126 -0
  91. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/iconsizes-source.md +78 -0
  92. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/list-source.md +27 -0
  93. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/listitem-source.md +272 -0
  94. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/liststate-source.md +427 -0
  95. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/material-hct-source.md +217 -0
  96. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/projectedcontext-source.md +265 -0
  97. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stack-source.md +368 -0
  98. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stackitemscope-source.md +440 -0
  99. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stackstate-source.md +325 -0
  100. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/surface-source.md +1211 -0
  101. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/titlechip-samples-source.md +101 -0
  102. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/titlechip-source.md +131 -0
  103. package/skills/android-edge-to-edge/SKILL.md +429 -0
  104. package/skills/android-engage-sdk-integration/SKILL.md +130 -0
  105. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/faq.md +439 -0
  106. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/food.md +1149 -0
  107. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/healthandfitness.md +1055 -0
  108. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/listen.md +1050 -0
  109. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/otherverticals.md +1301 -0
  110. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/read.md +910 -0
  111. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/shopping.md +1224 -0
  112. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/social.md +719 -0
  113. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/travel.md +1413 -0
  114. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/continue-watching/index.md +19 -0
  115. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/entitlements.md +353 -0
  116. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/getting-started.md +202 -0
  117. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/recommendations.md +471 -0
  118. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/watch.md +1081 -0
  119. package/skills/android-engage-sdk-integration/references/clusters.md +154 -0
  120. package/skills/android-engage-sdk-integration/references/common.md +519 -0
  121. package/skills/android-engage-sdk-integration/references/patterns.md +527 -0
  122. package/skills/android-engage-sdk-integration/references/requests.md +260 -0
  123. package/skills/android-engage-sdk-integration/references/schemas/food.md +509 -0
  124. package/skills/android-engage-sdk-integration/references/schemas/listen.md +842 -0
  125. package/skills/android-engage-sdk-integration/references/schemas/other.md +220 -0
  126. package/skills/android-engage-sdk-integration/references/schemas/read.md +412 -0
  127. package/skills/android-engage-sdk-integration/references/schemas/shopping.md +357 -0
  128. package/skills/android-engage-sdk-integration/references/schemas/social.md +228 -0
  129. package/skills/android-engage-sdk-integration/references/schemas/travel.md +923 -0
  130. package/skills/android-engage-sdk-integration/references/schemas/tv.md +1226 -0
  131. package/skills/android-engage-sdk-integration/references/schemas/watch.md +1137 -0
  132. package/skills/android-engage-sdk-integration/references/troubleshooting.md +39 -0
  133. package/skills/android-gradle-build-debug/SKILL.md +71 -0
  134. package/skills/android-intent-security/SKILL.md +550 -0
  135. package/skills/android-leanback-to-compose-tv-migration/SKILL.md +743 -0
  136. package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/get-started/navigation.md +372 -0
  137. package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/playback/compose/browse.md +243 -0
  138. package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/playback/compose/index.md +153 -0
  139. package/skills/android-media3-cast-integration/SKILL.md +236 -0
  140. package/skills/android-media3-cast-integration/references/android/media/media3/cast/create-castplayer.md +390 -0
  141. package/skills/android-media3-cast-integration/references/android/media/media3/cast/customize-castoptions.md +93 -0
  142. package/skills/android-media3-cast-integration/references/android/media/media3/cast/index.md +21 -0
  143. package/skills/android-migrate-xml-views-to-jetpack-compose/SKILL.md +127 -0
  144. package/skills/android-migrate-xml-views-to-jetpack-compose/references/analysis-of-the-project-and-layout.md +42 -0
  145. package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/designsystems/migrate-xml-theme-to-compose.md +171 -0
  146. package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/migrate/interoperability-apis/compose-in-views.md +299 -0
  147. package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/migrate/interoperability-apis/views-in-compose.md +286 -0
  148. package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/setup-compose-dependencies-and-compiler.md +197 -0
  149. package/skills/android-migrate-xml-views-to-jetpack-compose/references/identify-optimal-xml-candidate.md +31 -0
  150. package/skills/android-migrate-xml-views-to-jetpack-compose/references/xml-layout-migration.md +86 -0
  151. package/skills/android-ml-kit-genai-prompt-api/SKILL.md +124 -0
  152. package/skills/android-ml-kit-genai-prompt-api/references/get-started.md +272 -0
  153. package/skills/android-ml-kit-genai-prompt-api/references/prefix-caching.md +146 -0
  154. package/skills/android-ml-kit-genai-prompt-api/references/prompt-design.md +55 -0
  155. package/skills/android-ml-kit-genai-prompt-api/references/prompt-optimization.md +74 -0
  156. package/skills/android-ml-kit-genai-prompt-api/references/structured-output.md +219 -0
  157. package/skills/android-ml-kit-genai-prompt-api/references/system-instructions.md +71 -0
  158. package/skills/android-navigation-3/SKILL.md +122 -0
  159. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/index.md +51 -0
  160. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/migration-guide.md +670 -0
  161. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/animations.md +147 -0
  162. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basic.md +89 -0
  163. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basicdsl.md +85 -0
  164. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basicsaveable.md +90 -0
  165. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/bottomsheet.md +195 -0
  166. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/common-ui.md +200 -0
  167. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/conditional-transitions.md +182 -0
  168. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/conditional.md +230 -0
  169. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-custommatcher.md +176 -0
  170. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-staticuri.md +140 -0
  171. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-syntheticbackstack.md +184 -0
  172. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/dialog.md +107 -0
  173. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/lifecycle-owner.md +185 -0
  174. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/material-listdetail.md +141 -0
  175. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/material-supportingpane.md +145 -0
  176. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/modular-hilt.md +283 -0
  177. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/modular-koin.md +287 -0
  178. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/multiple-backstacks.md +468 -0
  179. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/passingarguments.md +371 -0
  180. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/results-event.md +273 -0
  181. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/results-state.md +266 -0
  182. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/scenes-listdetail.md +435 -0
  183. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/scenes-twopane.md +244 -0
  184. package/skills/android-navigation-3/references/android/guide/navigation/type-safe-destinations.md +129 -0
  185. package/skills/android-navigation-event/SKILL.md +312 -0
  186. package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/dispatcher.md +134 -0
  187. package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/handle-back.md +217 -0
  188. package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/index.md +83 -0
  189. package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/setup.md +32 -0
  190. package/skills/android-play-billing-library-version-upgrade/SKILL.md +96 -0
  191. package/skills/android-play-billing-library-version-upgrade/references/android/google/play/billing/release-notes.md +1240 -0
  192. package/skills/android-play-billing-library-version-upgrade/references/migration-logic.md +78 -0
  193. package/skills/android-play-billing-library-version-upgrade/references/version-checklist.md +54 -0
  194. package/skills/android-play-policy-insights/SKILL.md +172 -0
  195. package/skills/android-play-policy-insights/resources/common_mandates.md +100 -0
  196. package/skills/android-play-policy-insights/resources/compliance_report_template.md +59 -0
  197. package/skills/android-play-policy-insights/resources/critic.md +86 -0
  198. package/skills/android-play-policy-insights/resources/goal_data_safety.md +212 -0
  199. package/skills/android-play-policy-insights/resources/goal_permissions_and_apis.md +459 -0
  200. package/skills/android-play-policy-insights/resources/goal_user_account.md +106 -0
  201. package/skills/android-play-policy-insights/resources/policies.json +321 -0
  202. package/skills/android-play-policy-insights/resources/scanner_config.json +843 -0
  203. package/skills/android-play-policy-insights/scripts/generate_report.py +860 -0
  204. package/skills/android-play-policy-insights/scripts/orchestrator.py +1313 -0
  205. package/skills/android-play-policy-insights/scripts/play_store_scraper.py +410 -0
  206. package/skills/android-play-policy-insights/scripts/scanner.py +261 -0
  207. package/skills/android-play-policy-insights/scripts/template_engine.py +243 -0
  208. package/skills/android-profiler/SKILL.md +60 -0
  209. package/skills/android-profiler/analysis/analysis_orchestrator.md +32 -0
  210. package/skills/android-profiler/analysis/workflows/perfetto-sql/perfetto_sql.md +28 -0
  211. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/perfetto_trace_analysis.md +121 -0
  212. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/guiding_principles.md +51 -0
  213. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/domain_hints_template.md +7 -0
  214. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_cpu.md +56 -0
  215. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_graphics.md +51 -0
  216. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_io.md +46 -0
  217. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_ipc.md +41 -0
  218. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_memory.md +55 -0
  219. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_power.md +33 -0
  220. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/per_candidate_analysis.md +172 -0
  221. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/triage.md +94 -0
  222. package/skills/android-profiler/recording/recording_orchestrator.md +36 -0
  223. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/perfetto_trace_recording.md +148 -0
  224. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/app_jank.pftxt +43 -0
  225. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/cpu_profile.pftxt +35 -0
  226. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/java_heap_dump.pftxt +21 -0
  227. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/long_background.pftxt +37 -0
  228. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/memory_counters.pftxt +45 -0
  229. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/native_heap.pftxt +21 -0
  230. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/sched_cpu.pftxt +33 -0
  231. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/trace_config_reference.md +102 -0
  232. package/skills/android-profiler/references/env_setup.md +15 -0
  233. package/skills/android-profiler/references/perfetto/setup.md +29 -0
  234. package/skills/android-profiler/references/perfetto/sql.md +327 -0
  235. package/skills/android-r8-analyzer/SKILL.md +72 -0
  236. package/skills/android-r8-analyzer/references/CONFIGURATION-ANALYZER.md +287 -0
  237. package/skills/android-r8-analyzer/references/CONFIGURATION.md +44 -0
  238. package/skills/android-r8-analyzer/references/KEEP-RULES-IMPACT-HIERARCHY.md +83 -0
  239. package/skills/android-r8-analyzer/references/REDUNDANT-RULES.md +222 -0
  240. package/skills/android-r8-analyzer/references/REFLECTION-GUIDE.md +139 -0
  241. package/skills/android-r8-analyzer/references/REPORT_FORMAT.md +51 -0
  242. package/skills/android-r8-analyzer/references/android/topic/performance/app-optimization/enable-app-optimization.md +252 -0
  243. package/skills/android-r8-analyzer/references/android/training/testing/other-components/ui-automator.md +312 -0
  244. package/skills/android-restore-credentials/SKILL.md +359 -0
  245. package/skills/android-restore-credentials/references/android/guide/topics/manifest/application-element.md +832 -0
  246. package/skills/android-restore-credentials/references/android/identity/passkeys/create-passkeys.md +327 -0
  247. package/skills/android-restore-credentials/references/android/identity/passkeys/sign-in-with-passkeys.md +219 -0
  248. package/skills/android-styles/SKILL.md +229 -0
  249. package/skills/android-styles/references/android/develop/ui/compose/designsystems/custom.md +459 -0
  250. package/skills/android-styles/references/android/develop/ui/compose/styles/fundamentals.md +421 -0
  251. package/skills/android-styles/references/android/develop/ui/compose/styles/state-animations.md +461 -0
  252. package/skills/android-styles/references/android/develop/ui/compose/styles/styles-vs-modifiers.md +48 -0
  253. package/skills/android-styles/references/android/develop/ui/compose/styles/theming.md +269 -0
  254. package/skills/android-verified-email/SKILL.md +432 -0
  255. package/skills/android-verified-email/references/android/identity/credential-manager/index.md +67 -0
  256. package/skills/android-verified-email/references/android/identity/digital-credentials/credential-verifier.md +166 -0
  257. package/skills/android-verified-email/references/android/identity/digital-credentials/email-verification-implementation.md +313 -0
  258. package/skills/android-verified-email/references/android/identity/digital-credentials/email-verification.md +158 -0
  259. package/skills/android-verified-email/references/android/identity/digital-credentials/index.md +112 -0
  260. package/skills/android-verified-email/references/android/identity/passkeys/create-passkeys.md +327 -0
  261. package/skills/android-verified-email/references/android/identity/sign-in/credential-manager-webview.md +84 -0
  262. package/skills/android-wear-compose-m3/SKILL.md +365 -0
  263. package/skills/android-wear-compose-m3/references/android/training/wearables/compose/migrate-to-material3.md +677 -0
  264. package/skills/android-wear-compose-m3/references/foundation/AmbientModeSample.kt.md +123 -0
  265. package/skills/android-wear-compose-m3/references/foundation/AmbientModeSample.kt.md.txt +123 -0
  266. package/skills/android-wear-compose-m3/references/foundation/CurvedWorldSample.kt.md +430 -0
  267. package/skills/android-wear-compose-m3/references/foundation/CurvedWorldSample.kt.md.txt +430 -0
  268. package/skills/android-wear-compose-m3/references/foundation/ExpandableSample.kt.md +99 -0
  269. package/skills/android-wear-compose-m3/references/foundation/ExpandableSample.kt.md.txt +99 -0
  270. package/skills/android-wear-compose-m3/references/foundation/HierarchicalFocusSample.kt.md +141 -0
  271. package/skills/android-wear-compose-m3/references/foundation/HierarchicalFocusSample.kt.md.txt +141 -0
  272. package/skills/android-wear-compose-m3/references/foundation/PagerSamples.kt.md +56 -0
  273. package/skills/android-wear-compose-m3/references/foundation/PagerSamples.kt.md.txt +56 -0
  274. package/skills/android-wear-compose-m3/references/foundation/RotarySamples.kt.md +153 -0
  275. package/skills/android-wear-compose-m3/references/foundation/RotarySamples.kt.md.txt +153 -0
  276. package/skills/android-wear-compose-m3/references/foundation/ScalingLazyColumnSample.kt.md +131 -0
  277. package/skills/android-wear-compose-m3/references/foundation/ScalingLazyColumnSample.kt.md.txt +131 -0
  278. package/skills/android-wear-compose-m3/references/foundation/SwipeToDismissBoxSample.kt.md +169 -0
  279. package/skills/android-wear-compose-m3/references/foundation/SwipeToDismissBoxSample.kt.md.txt +169 -0
  280. package/skills/android-wear-compose-m3/references/foundation/SwipeToRevealSample.kt.md +282 -0
  281. package/skills/android-wear-compose-m3/references/foundation/SwipeToRevealSample.kt.md.txt +282 -0
  282. package/skills/android-wear-compose-m3/references/foundation/TransformingLazyColumnSample.kt.md +335 -0
  283. package/skills/android-wear-compose-m3/references/foundation/TransformingLazyColumnSample.kt.md.txt +335 -0
  284. package/skills/android-wear-compose-m3/references/material3/AlertDialogSample.kt.md +377 -0
  285. package/skills/android-wear-compose-m3/references/material3/AlertDialogSample.kt.md.txt +377 -0
  286. package/skills/android-wear-compose-m3/references/material3/AnimatedTextSample.kt.md +165 -0
  287. package/skills/android-wear-compose-m3/references/material3/AnimatedTextSample.kt.md.txt +165 -0
  288. package/skills/android-wear-compose-m3/references/material3/ButtonGroupSample.kt.md +91 -0
  289. package/skills/android-wear-compose-m3/references/material3/ButtonGroupSample.kt.md.txt +91 -0
  290. package/skills/android-wear-compose-m3/references/material3/ButtonSample.kt.md +496 -0
  291. package/skills/android-wear-compose-m3/references/material3/ButtonSample.kt.md.txt +496 -0
  292. package/skills/android-wear-compose-m3/references/material3/CardSample.kt.md +470 -0
  293. package/skills/android-wear-compose-m3/references/material3/CardSample.kt.md.txt +470 -0
  294. package/skills/android-wear-compose-m3/references/material3/CheckboxButtonSample.kt.md +67 -0
  295. package/skills/android-wear-compose-m3/references/material3/CheckboxButtonSample.kt.md.txt +67 -0
  296. package/skills/android-wear-compose-m3/references/material3/ConfirmationDialogSample.kt.md +162 -0
  297. package/skills/android-wear-compose-m3/references/material3/ConfirmationDialogSample.kt.md.txt +162 -0
  298. package/skills/android-wear-compose-m3/references/material3/CurvedTextSamples.kt.md +78 -0
  299. package/skills/android-wear-compose-m3/references/material3/CurvedTextSamples.kt.md.txt +78 -0
  300. package/skills/android-wear-compose-m3/references/material3/DatePickerSample.kt.md +131 -0
  301. package/skills/android-wear-compose-m3/references/material3/DatePickerSample.kt.md.txt +131 -0
  302. package/skills/android-wear-compose-m3/references/material3/DynamicColorSchemeSample.kt.md +74 -0
  303. package/skills/android-wear-compose-m3/references/material3/DynamicColorSchemeSample.kt.md.txt +74 -0
  304. package/skills/android-wear-compose-m3/references/material3/EdgeButtonSample.kt.md +63 -0
  305. package/skills/android-wear-compose-m3/references/material3/EdgeButtonSample.kt.md.txt +63 -0
  306. package/skills/android-wear-compose-m3/references/material3/FadingExpandingLabelSample.kt.md +60 -0
  307. package/skills/android-wear-compose-m3/references/material3/FadingExpandingLabelSample.kt.md.txt +60 -0
  308. package/skills/android-wear-compose-m3/references/material3/IconButtonSample.kt.md +125 -0
  309. package/skills/android-wear-compose-m3/references/material3/IconButtonSample.kt.md.txt +125 -0
  310. package/skills/android-wear-compose-m3/references/material3/IconToggleButtonSample.kt.md +116 -0
  311. package/skills/android-wear-compose-m3/references/material3/IconToggleButtonSample.kt.md.txt +116 -0
  312. package/skills/android-wear-compose-m3/references/material3/LevelIndicatorSample.kt.md +68 -0
  313. package/skills/android-wear-compose-m3/references/material3/LevelIndicatorSample.kt.md.txt +68 -0
  314. package/skills/android-wear-compose-m3/references/material3/LinearProgressIndicatorSample.kt.md +50 -0
  315. package/skills/android-wear-compose-m3/references/material3/LinearProgressIndicatorSample.kt.md.txt +50 -0
  316. package/skills/android-wear-compose-m3/references/material3/ListHeaderSample.kt.md +177 -0
  317. package/skills/android-wear-compose-m3/references/material3/ListHeaderSample.kt.md.txt +177 -0
  318. package/skills/android-wear-compose-m3/references/material3/OneHandedGestureSamples.kt.md +651 -0
  319. package/skills/android-wear-compose-m3/references/material3/OneHandedGestureSamples.kt.md.txt +651 -0
  320. package/skills/android-wear-compose-m3/references/material3/OpenOnPhoneDialogSample.kt.md +57 -0
  321. package/skills/android-wear-compose-m3/references/material3/OpenOnPhoneDialogSample.kt.md.txt +57 -0
  322. package/skills/android-wear-compose-m3/references/material3/PageIndicatorSample.kt.md +110 -0
  323. package/skills/android-wear-compose-m3/references/material3/PageIndicatorSample.kt.md.txt +110 -0
  324. package/skills/android-wear-compose-m3/references/material3/PagerScaffoldSample.kt.md +204 -0
  325. package/skills/android-wear-compose-m3/references/material3/PagerScaffoldSample.kt.md.txt +204 -0
  326. package/skills/android-wear-compose-m3/references/material3/PickerGroupSample.kt.md +139 -0
  327. package/skills/android-wear-compose-m3/references/material3/PickerGroupSample.kt.md.txt +139 -0
  328. package/skills/android-wear-compose-m3/references/material3/PickerSample.kt.md +111 -0
  329. package/skills/android-wear-compose-m3/references/material3/PickerSample.kt.md.txt +111 -0
  330. package/skills/android-wear-compose-m3/references/material3/PlaceholderSample.kt.md +184 -0
  331. package/skills/android-wear-compose-m3/references/material3/PlaceholderSample.kt.md.txt +184 -0
  332. package/skills/android-wear-compose-m3/references/material3/ProgressIndicatorSample.kt.md +263 -0
  333. package/skills/android-wear-compose-m3/references/material3/ProgressIndicatorSample.kt.md.txt +263 -0
  334. package/skills/android-wear-compose-m3/references/material3/RadioButtonSample.kt.md +105 -0
  335. package/skills/android-wear-compose-m3/references/material3/RadioButtonSample.kt.md.txt +105 -0
  336. package/skills/android-wear-compose-m3/references/material3/ScaffoldSample.kt.md +146 -0
  337. package/skills/android-wear-compose-m3/references/material3/ScaffoldSample.kt.md.txt +146 -0
  338. package/skills/android-wear-compose-m3/references/material3/ScrollAwaySample.kt.md +97 -0
  339. package/skills/android-wear-compose-m3/references/material3/ScrollAwaySample.kt.md.txt +97 -0
  340. package/skills/android-wear-compose-m3/references/material3/ScrollIndicatorSample.kt.md +66 -0
  341. package/skills/android-wear-compose-m3/references/material3/ScrollIndicatorSample.kt.md.txt +66 -0
  342. package/skills/android-wear-compose-m3/references/material3/SliderSample.kt.md +86 -0
  343. package/skills/android-wear-compose-m3/references/material3/SliderSample.kt.md.txt +86 -0
  344. package/skills/android-wear-compose-m3/references/material3/StepperSample.kt.md +148 -0
  345. package/skills/android-wear-compose-m3/references/material3/StepperSample.kt.md.txt +148 -0
  346. package/skills/android-wear-compose-m3/references/material3/SurfaceTransformationSample.kt.md +166 -0
  347. package/skills/android-wear-compose-m3/references/material3/SurfaceTransformationSample.kt.md.txt +166 -0
  348. package/skills/android-wear-compose-m3/references/material3/SwipeToDismissBoxSample.kt.md +172 -0
  349. package/skills/android-wear-compose-m3/references/material3/SwipeToDismissBoxSample.kt.md.txt +172 -0
  350. package/skills/android-wear-compose-m3/references/material3/SwipeToRevealSample.kt.md +367 -0
  351. package/skills/android-wear-compose-m3/references/material3/SwipeToRevealSample.kt.md.txt +367 -0
  352. package/skills/android-wear-compose-m3/references/material3/SwitchButtonSample.kt.md +66 -0
  353. package/skills/android-wear-compose-m3/references/material3/SwitchButtonSample.kt.md.txt +66 -0
  354. package/skills/android-wear-compose-m3/references/material3/TextButtonSample.kt.md +115 -0
  355. package/skills/android-wear-compose-m3/references/material3/TextButtonSample.kt.md.txt +115 -0
  356. package/skills/android-wear-compose-m3/references/material3/TextToggleButtonSample.kt.md +71 -0
  357. package/skills/android-wear-compose-m3/references/material3/TextToggleButtonSample.kt.md.txt +71 -0
  358. package/skills/android-wear-compose-m3/references/material3/TimePickerSample.kt.md +151 -0
  359. package/skills/android-wear-compose-m3/references/material3/TimePickerSample.kt.md.txt +151 -0
  360. package/skills/android-wear-compose-m3/references/material3/TimeTextSample.kt.md +65 -0
  361. package/skills/android-wear-compose-m3/references/material3/TimeTextSample.kt.md.txt +65 -0
  362. package/skills/android-wear-compose-m3/references/material3/TransformationSpecSample.kt.md +246 -0
  363. package/skills/android-wear-compose-m3/references/material3/TransformationSpecSample.kt.md.txt +246 -0
  364. package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnNotificationsSample.kt.md +89 -0
  365. package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnNotificationsSample.kt.md.txt +89 -0
  366. package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnSample.kt.md +309 -0
  367. package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnSample.kt.md.txt +309 -0
  368. package/skills/android-wear-compose-m3/references/navigation3/SwipeDismissableSceneStrategySample.kt.md +205 -0
  369. package/skills/android-wear-compose-m3/references/navigation3/SwipeDismissableSceneStrategySample.kt.md.txt +205 -0
  370. package/skills/{architecture-feature-first → flutter-architecture-feature-first}/SKILL.md +1 -1
  371. package/skills/{bloc → flutter-bloc}/SKILL.md +1 -1
  372. package/skills/flutter-build-debug/SKILL.md +66 -0
  373. package/skills/{code-review → flutter-code-review}/SKILL.md +1 -1
  374. package/skills/{dart-3-updates → flutter-dart-3-updates}/SKILL.md +1 -1
  375. package/skills/{dart-fix-runtime-errors → flutter-dart-fix-runtime-errors}/SKILL.md +1 -1
  376. package/skills/{dart-resolve-package-conflicts → flutter-dart-resolve-package-conflicts}/SKILL.md +1 -1
  377. package/skills/{dart-run-static-analysis → flutter-dart-run-static-analysis}/SKILL.md +1 -1
  378. package/skills/{dart-use-pattern-matching → flutter-dart-use-pattern-matching}/SKILL.md +1 -1
  379. package/skills/{effective-dart → flutter-effective-dart}/SKILL.md +1 -1
  380. package/skills/{provider → flutter-provider}/SKILL.md +1 -1
  381. package/skills/{riverpod → flutter-riverpod}/SKILL.md +1 -1
  382. package/skills/ios-cocoapods-debug/SKILL.md +65 -0
  383. package/skills/ios-code-review/SKILL.md +56 -0
  384. package/skills/ios-xcode-build-debug/SKILL.md +66 -0
  385. package/skills/{detect-mobile-stack → mobile-detect-stack}/SKILL.md +1 -1
  386. package/skills/mobile-firebase/SKILL.md +54 -0
  387. package/skills/mobile-firebase/references/android/ai-logic.md +31 -0
  388. package/skills/mobile-firebase/references/android/analytics.md +33 -0
  389. package/skills/mobile-firebase/references/android/app-check.md +36 -0
  390. package/skills/mobile-firebase/references/android/auth.md +44 -0
  391. package/skills/mobile-firebase/references/android/crashlytics.md +31 -0
  392. package/skills/mobile-firebase/references/android/firestore.md +44 -0
  393. package/skills/mobile-firebase/references/android/functions.md +33 -0
  394. package/skills/mobile-firebase/references/android/in-app-messaging.md +28 -0
  395. package/skills/mobile-firebase/references/android/messaging.md +41 -0
  396. package/skills/mobile-firebase/references/android/realtime-database.md +50 -0
  397. package/skills/mobile-firebase/references/android/remote-config.md +43 -0
  398. package/skills/mobile-firebase/references/android/sql-connect.md +31 -0
  399. package/skills/mobile-firebase/references/android/storage.md +39 -0
  400. package/skills/mobile-firebase/references/android.md +30 -0
  401. package/skills/{firebase-ai/SKILL.md → mobile-firebase/references/flutter/ai-logic.md} +2 -8
  402. package/skills/{firebase-analytics/SKILL.md → mobile-firebase/references/flutter/analytics.md} +2 -8
  403. package/skills/{firebase-app-check/SKILL.md → mobile-firebase/references/flutter/app-check.md} +2 -8
  404. package/skills/{firebase-auth/SKILL.md → mobile-firebase/references/flutter/auth.md} +2 -8
  405. package/skills/{firebase-crashlytics/SKILL.md → mobile-firebase/references/flutter/crashlytics.md} +2 -8
  406. package/skills/{firebase-cloud-firestore/SKILL.md → mobile-firebase/references/flutter/firestore.md} +2 -8
  407. package/skills/{firebase-cloud-functions/SKILL.md → mobile-firebase/references/flutter/functions.md} +2 -8
  408. package/skills/{firebase-in-app-messaging/SKILL.md → mobile-firebase/references/flutter/in-app-messaging.md} +2 -8
  409. package/skills/{firebase-messaging/SKILL.md → mobile-firebase/references/flutter/messaging.md} +2 -8
  410. package/skills/{firebase-database/SKILL.md → mobile-firebase/references/flutter/realtime-database.md} +2 -8
  411. package/skills/{firebase-remote-config/SKILL.md → mobile-firebase/references/flutter/remote-config.md} +2 -8
  412. package/skills/{flutterfire-configure/SKILL.md → mobile-firebase/references/flutter/setup-flutterfire.md} +1 -8
  413. package/skills/{firebase-data-connect/SKILL.md → mobile-firebase/references/flutter/sql-connect.md} +2 -8
  414. package/skills/{firebase-storage/SKILL.md → mobile-firebase/references/flutter/storage.md} +2 -8
  415. package/skills/mobile-firebase/references/flutter.md +36 -0
  416. package/skills/mobile-firebase/references/ios/ai-logic.md +30 -0
  417. package/skills/mobile-firebase/references/ios/analytics.md +33 -0
  418. package/skills/mobile-firebase/references/ios/app-check.md +36 -0
  419. package/skills/mobile-firebase/references/ios/auth.md +48 -0
  420. package/skills/mobile-firebase/references/ios/crashlytics.md +34 -0
  421. package/skills/mobile-firebase/references/ios/firestore.md +53 -0
  422. package/skills/mobile-firebase/references/ios/functions.md +35 -0
  423. package/skills/mobile-firebase/references/ios/in-app-messaging.md +26 -0
  424. package/skills/mobile-firebase/references/ios/messaging.md +45 -0
  425. package/skills/mobile-firebase/references/ios/realtime-database.md +49 -0
  426. package/skills/mobile-firebase/references/ios/remote-config.md +44 -0
  427. package/skills/mobile-firebase/references/ios/sql-connect.md +33 -0
  428. package/skills/mobile-firebase/references/ios/storage.md +36 -0
  429. package/skills/mobile-firebase/references/ios.md +28 -0
  430. package/skills/mobile-firebase/references/react-native/ai-logic.md +32 -0
  431. package/skills/mobile-firebase/references/react-native/analytics.md +43 -0
  432. package/skills/mobile-firebase/references/react-native/app-check.md +35 -0
  433. package/skills/mobile-firebase/references/react-native/auth.md +50 -0
  434. package/skills/mobile-firebase/references/react-native/crashlytics.md +36 -0
  435. package/skills/mobile-firebase/references/react-native/firestore.md +45 -0
  436. package/skills/mobile-firebase/references/react-native/functions.md +28 -0
  437. package/skills/mobile-firebase/references/react-native/in-app-messaging.md +27 -0
  438. package/skills/mobile-firebase/references/react-native/messaging.md +46 -0
  439. package/skills/mobile-firebase/references/react-native/realtime-database.md +46 -0
  440. package/skills/mobile-firebase/references/react-native/remote-config.md +32 -0
  441. package/skills/mobile-firebase/references/react-native/sql-connect.md +11 -0
  442. package/skills/mobile-firebase/references/react-native/storage.md +30 -0
  443. package/skills/mobile-firebase/references/react-native.md +29 -0
  444. package/skills/mobile-test/SKILL.md +63 -0
  445. package/skills/mobile-test/references/android/setup/GUIDE.md +183 -0
  446. package/skills/mobile-test/references/android/setup/references/android/develop/ui/compose/testing/common-patterns.md +181 -0
  447. package/skills/mobile-test/references/android/setup/references/android/studio/preview/compose-screenshot-testing.md +255 -0
  448. package/skills/mobile-test/references/android/setup/references/android/training/dependency-injection/hilt-testing.md +447 -0
  449. package/skills/mobile-test/references/android.md +83 -0
  450. package/skills/{dart-collect-coverage/SKILL.md → mobile-test/references/flutter/coverage.md} +2 -11
  451. package/skills/{dart-generate-test-mocks/SKILL.md → mobile-test/references/flutter/generate-mocks.md} +2 -11
  452. package/skills/{flutter-add-integration-test/SKILL.md → mobile-test/references/flutter/integration-tests.md} +2 -11
  453. package/skills/{dart-migrate-to-checks-package/SKILL.md → mobile-test/references/flutter/migrate-to-checks.md} +2 -13
  454. package/skills/{mockito/SKILL.md → mobile-test/references/flutter/mockito.md} +1 -8
  455. package/skills/{mocktail/SKILL.md → mobile-test/references/flutter/mocktail.md} +1 -8
  456. package/skills/{patrol-e2e-testing/SKILL.md → mobile-test/references/flutter/patrol.md} +1 -8
  457. package/skills/{testing/SKILL.md → mobile-test/references/flutter/testing-guidelines.md} +1 -8
  458. package/skills/{dart-add-unit-test/SKILL.md → mobile-test/references/flutter/unit-tests.md} +2 -11
  459. package/skills/{flutter-add-widget-test/SKILL.md → mobile-test/references/flutter/widget-tests.md} +2 -11
  460. package/skills/mobile-test/references/flutter.md +44 -0
  461. package/skills/mobile-test/references/ios.md +79 -0
  462. package/skills/mobile-test/references/react-native.md +62 -0
  463. /package/skills/{dart-use-pattern-matching → flutter-dart-use-pattern-matching}/examples/json_patterns.dart +0 -0
@@ -0,0 +1,39 @@
1
+ This guide helps resolve common compilation, import, and sandbox-related errors encountered during the Play Engage SDK integration.
2
+
3
+ ## 1. Ensure sandbox compilation safety for agents
4
+
5
+ When executing compilations in sandboxed or ephemeral workspaces, such as evaluation environments or automated presubmits, you must follow these rules to prevent container crashes and lockups:
6
+
7
+ - **Use full compilation** : Run `./gradlew compileDebugUnitTestSources --no-daemon` or `./gradlew assembleDebug --no-daemon`.
8
+ - **Don't use compilation shortcuts** : Avoid commands like `./gradlew :app:compileDebugKotlin` or other compile-only tasks. These shortcuts bypass manifest merging and resource packaging, which can hide critical errors like namespace conflicts or XML syntax errors.
9
+ - **Don't run full tests or builds** : Don't run `./gradlew test` or `./gradlew build`. These tasks trigger heavy testing environments (requiring emulators) and run full builds, which easily crash the FUSE filesystem mounts and exhaust sandbox CPU and RAM.
10
+ - **Always use --no-daemon** : Always append `--no-daemon` to prevent background JVM processes from leaking and locking files in the sandbox.
11
+
12
+ ## 2. Resolve missing imports
13
+
14
+ If you're upgrading the SDK version, for example, to 1.6.0, or if you get `Unresolved reference` errors during the initial compilation, make sure you've added the correct import statements:
15
+
16
+ | Class name | Package or import statement | Note |
17
+ |---|---|---|
18
+ | `ImageTheme` | `import com.google.android.engage.common.datamodel.ImageTheme` | |
19
+ | `PlatformSpecificUri` | `import com.google.android.engage.common.datamodel.PlatformSpecificUri` | |
20
+ | `DisplayTimeWindow` | `import com.google.android.engage.common.datamodel.DisplayTimeWindow` | |
21
+ | `RatingSystem` | `import com.google.android.engage.video.datamodel.RatingSystem` | Note: It's under `video.datamodel`, not `common.datamodel`. |
22
+
23
+ ## 3. Resolve namespace conflicts
24
+
25
+ You might receive an error message like this one:
26
+
27
+ Namespace 'com.google.android.engage' is used in multiple modules and/or libraries: com.google.android.engage:engage-core:1.6.0, com.google.android.engage:engage-tv:1.1.0
28
+
29
+ This conflict occurs because both packages declare the same namespace.
30
+ \* **Resolution** : Remove the explicit `engage-core` dependency from your `build.gradle` or `build.gradle.kts` and keep *only* `engage-tv`. The `engage-tv` library transitively pulls in the compatible version of `engage-core` automatically.
31
+
32
+ ## 4. Resolve sandbox-specific build and test failures
33
+
34
+ When compiling or running tests in the evaluation sandbox (especially for large projects like Now in Android), you might encounter environment-specific failures:
35
+
36
+ - **Jlink error with Android SDK 36** : If the build fails during Java compilation with a `jlink` error in `JdkImageTransform` for `android-36`, force Gradle to use JDK 17 by prepending `JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64` to the Gradle command.
37
+ - **Missing ANDROID_HOME** : If lint or test tasks fail complaining about missing SDK, explicitly set the environment variable `ANDROID_HOME=/usr/local/google/home/shashvatgupta/Android/Sdk` (or the corresponding path on the workstation).
38
+ - **Roborazzi screenshot mismatches** : Headless or sandbox container rendering might differ from local golden images, causing Roborazzi screenshot test assertions to fail. Bypass these visual checks by appending `-Proborazzi.test.verify=false` to your test command.
39
+ - **Robolectric SDK 36 unsupported** : If screenshot tests fail with `java.lang.UnsupportedOperationException` in `DefaultSdkProvider` due to experimental SDK 36, update the `@Config` annotation in the failing test files to pin the SDK to 34 (e.g., `@Config(..., sdk = [34])`).
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: android-gradle-build-debug
3
+ description: Diagnoses failing Android Gradle builds — JDK, Gradle, Android Gradle Plugin and Kotlin version mismatches, dependency resolution and duplicate classes, compileSdk and minSdk errors, manifest merger and namespace failures, kapt/KSP, R8 missing classes, signing and out-of-memory builds. Use whenever an Android, Kotlin Multiplatform, Flutter or React Native build fails in Gradle, when the log shows "What went wrong", "Execution failed for task" or "BUILD FAILED", or after upgrading AGP, Gradle, Kotlin or the JDK, even if the user only pastes the error.
4
+ intents: [debug, build, dependency, migration]
5
+ stacks: [android, kotlin-multiplatform]
6
+ areas: [gradle, manifest, proguard, signing]
7
+ ---
8
+
9
+ # Android Gradle Build Debug
10
+
11
+ A Gradle failure is usually one of a few causes wearing a long stack trace. Work in this order: find the first real error, check the toolchain versions, then match the error to a section below. Confirm every cause in the build files before proposing a fix.
12
+
13
+ ## 1. Find the first real error
14
+
15
+ - The useful part is the `* What went wrong:` block and the first `e:` (Kotlin) or `error:` (Java) line. Later failures often cascade from it.
16
+ - Rerun the failing task with more detail when the log is too short: `./gradlew :app:assembleDebug --stacktrace`, then `--info`. Do not suggest `--scan` without telling the user it uploads the build data to a public Gradle service.
17
+ - In Flutter and React Native projects, run Gradle from the `android/` folder, or read the Gradle section of the `flutter build` / `react-native run-android` output.
18
+
19
+ ## 2. Toolchain versions
20
+
21
+ Most failures after an upgrade are a version mismatch. Collect the versions before theorizing:
22
+
23
+ | What | Where |
24
+ |---|---|
25
+ | Gradle | `gradle/wrapper/gradle-wrapper.properties` (`distributionUrl`) |
26
+ | Android Gradle Plugin (AGP) | `plugins { id("com.android.application") version ... }`, the version catalog (`gradle/libs.versions.toml`) or `classpath` in the root build file |
27
+ | Kotlin | `org.jetbrains.kotlin.*` plugin version, same places |
28
+ | JDK running Gradle | `./gradlew --version` (the JVM line), `org.gradle.java.home` in `gradle.properties`, `JAVA_HOME`, Android Studio's bundled JDK. Flutter: `flutter doctor -v` shows the Java binary, and `flutter config --jdk-dir` overrides it |
29
+
30
+ Then check them against each other with the official tables — AGP ↔ Gradle ↔ JDK in the Android Gradle plugin release notes, Gradle ↔ Java in the Gradle compatibility matrix, Kotlin ↔ Gradle/AGP in the Kotlin Gradle plugin docs. Quote the versions you found; do not state a compatibility range from memory.
31
+
32
+ Typical signatures:
33
+
34
+ - `Android Gradle plugin requires Java 17 to run. You are currently using Java 11.` → Gradle runs on an older JDK than AGP needs. Fix the JDK Gradle uses, not the app's `compileOptions`.
35
+ - `Unsupported class file major version 65` (or 61, 66...) → a JDK newer than the Gradle version supports (major 61 = Java 17, 65 = Java 21). Upgrade the wrapper or run Gradle on an older JDK.
36
+ - `Minimum supported Gradle version is X. Current version is Y.` → upgrade `distributionUrl` to at least X.
37
+ - `Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17)` → Java and Kotlin target different bytecode levels. Align them, preferably with `kotlin { jvmToolchain(N) }` or matching `compileOptions` and `kotlinOptions.jvmTarget`.
38
+
39
+ ## 3. Dependencies
40
+
41
+ - [ ] `Could not resolve` / `Could not find` → check the repositories in `settings.gradle(.kts)` (`dependencyResolutionManagement`) and the module build files. `repositoriesMode.set(FAIL_ON_PROJECT_REPOS)` makes module-level `repositories {}` an error. A coordinate that only existed in JCenter will not resolve anymore. Also rule out `--offline` and corporate proxies.
42
+ - [ ] `Duplicate class X found in modules A and B` → two artifacts ship the same classes. Find who brings each: `./gradlew :app:dependencyInsight --dependency <group:name> --configuration debugRuntimeClasspath`. Align versions (a BOM or platform) or exclude the redundant artifact — do not add both.
43
+ - [ ] `Dependency 'X' requires libraries and applications that depend on it to compile against version N or later of the Android APIs` → raise `compileSdk` to N. This is only the compile SDK; `targetSdk` is a separate decision with behavior changes.
44
+ - [ ] Version conflicts after an upgrade: `./gradlew :app:dependencies --configuration debugRuntimeClasspath` shows what Gradle actually picked (`->` marks an upgrade).
45
+
46
+ ## 4. Manifest and module setup
47
+
48
+ - [ ] `uses-sdk:minSdkVersion A cannot be smaller than version B declared in library X` → a dependency needs a higher `minSdk`. Raising it drops devices below B; say so. `tools:overrideLibrary` only silences the check and crashes at runtime on those devices.
49
+ - [ ] `android:exported needs to be explicitly specified for element <activity ...>` → apps targeting Android 12 (API 31) or higher must set `android:exported` on components with intent filters. Decide per component: `true` only for real entry points (launcher activity, deep links).
50
+ - [ ] `Namespace not specified` → AGP 8 requires `android { namespace = "..." }` in each Android module; the `package` attribute in the manifest is no longer used for it.
51
+ - [ ] `Manifest merger failed` with other messages → read `app/build/intermediates/merged_manifest/<variant>/.../AndroidManifest.xml` and the merger report next to it to see which library contributed the conflicting attribute.
52
+
53
+ ## 5. Annotation processing and code generation
54
+
55
+ - [ ] kapt or KSP errors after a Kotlin upgrade → KSP releases are built for specific Kotlin versions. Check that the KSP plugin version matches the project's Kotlin version in the KSP release list.
56
+ - [ ] Hilt, Room or Moshi generated code missing → the processor dependency is declared with the wrong configuration (`implementation` instead of `kapt`/`ksp`), or the plugin is not applied in that module.
57
+
58
+ ## 6. Release builds
59
+
60
+ - [ ] `Missing classes detected while running R8` → R8 writes suggested rules to `app/build/outputs/mapping/<variant>/missing_rules.txt`. Read them before copying: a `-dontwarn` for a class the app really uses turns a build error into a runtime crash.
61
+ - [ ] Release crashes that do not happen in debug → reflection-based libraries stripped by R8; check the library's documented keep rules.
62
+ - [ ] `Keystore file not found` / `signingConfig` errors → the path or password comes from `key.properties` or environment variables that do not exist on this machine or CI. Never suggest committing the keystore or its passwords.
63
+
64
+ ## 7. Environment
65
+
66
+ - [ ] `Java heap space`, `GC overhead limit exceeded` or `Metaspace` → raise `org.gradle.jvmargs` in `gradle.properties` (for example `-Xmx4g`), and check that parallel builds fit the machine or CI runner.
67
+ - [ ] Errors mentioning corrupted caches or transforms (`Could not read workspace metadata`) → first `./gradlew --stop` and retry. Deleting `~/.gradle/caches` works but forces a full re-download; propose it, do not run it without confirmation.
68
+
69
+ ## Output
70
+
71
+ Report the first real error, the versions involved, the cause with evidence (`file:line` or the log line), and the minimal fix as a diff or commands. State side effects of the fix, such as a higher minimum Android version or a Gradle upgrade that requires a newer JDK on CI.
@@ -0,0 +1,550 @@
1
+ ---
2
+ name: android-intent-security
3
+ description: Best practices for Android Intent security. Use this skill when auditing
4
+ component configurations in AndroidManifest.xml activities, services, receivers)
5
+ or source code handling incoming Intents (getIntent, getParcelableExtra) to prevent
6
+ Intent Redirection and unauthorized access.
7
+ license: Apache-2.0
8
+ source: https://github.com/android/skills
9
+ intents: [security, review]
10
+ stacks: [android]
11
+ metadata:
12
+ author: Google LLC
13
+ last-updated: '2026-08-14'
14
+ keywords:
15
+ - recipe
16
+ - Android
17
+ - Security
18
+ - Intent
19
+ - Redirection
20
+ - PendingIntent
21
+ - ContentProvider
22
+ - Service
23
+ - Signature
24
+ - Verification
25
+ - sanitizer
26
+ - Vulnerability
27
+ - Best Practices
28
+ ---
29
+
30
+ This skill provides guidelines and patterns to secure Android components
31
+ (Activities, Services, Broadcast Receivers, Content Providers) and handle
32
+ Intents safely, preventing privilege escalation and unauthorized access.
33
+
34
+ ## Glossary
35
+
36
+ - **Intent:** An asynchronous messaging object used to request an action from another app component.
37
+ - **Exported component:** A component (`android:exported="true"`) that can be launched by other apps on the device.
38
+ - **Sticky intent:** A broadcast intent that remains in the system cache after it's sent, allowing any app to retrieve its contents.
39
+ - **Signature permission:** A permission whose protection level is set to `signature`, granted only to apps signed with the same developer key.
40
+ - **onNewIntent:** An activity lifecycle callback invoked when an activity is launched with `FLAG_ACTIVITY_SINGLE_TOP` and is already running at the top of the history stack.
41
+ - **PendingIntent:** A token granted to a foreign application (for example, system services) allowing it to execute a predefined Intent with the creator's permissions.
42
+ - **Mutable PendingIntent:** A PendingIntent whose underlying Intent parameters can be modified by the receiving application.
43
+ - **ContentProvider:** A component that encapsulates data and provides it to other applications via standard query/insert interfaces.
44
+ - **IntentSanitizer:** A utility class in AndroidX Core used to build a safe, sanitized copy of an incoming Intent by filtering out unauthorized components, actions, or extras.
45
+ - **Intent redirection (forwarding):** A vulnerability where an application receives an intent from an untrusted source and uses it to launch a private, non-exported component.
46
+
47
+ ## Prerequisites
48
+
49
+ - The agent **MUST** be able to describe the function and security implications of `onCreate`, `onNewIntent`, and the `singleTop` launch mode.
50
+ - The agent **MUST** be able to declare `<activity>`, `<service>`, `<receiver>`, and `<provider>` tags in `AndroidManifest.xml` and define their `android:exported` and `android:permission` attributes.
51
+ - The agent **MUST** be able to implement signature verification checks using `PackageManager`.
52
+
53
+ ## Limitations
54
+
55
+ - This skill focuses on local inter-component and inter-app communication security on the Android platform.
56
+ - This skill **doesn't** cover network security, web integration, or host-to-server security.
57
+
58
+ ## Setup and dependencies
59
+
60
+ - **Android SDK:** Minimum API Level 23 (Android 6.0) is required for standard hardware-backed keystore operations and component validation.
61
+ - **AndroidX Core Library:** `androidx.core:core:1.9.0` or higher is **mandatory** to leverage `IntentSanitizer`.
62
+ - **Standard API access:** Standard Android `PackageManager` APIs are required for runtime component verification.
63
+
64
+ *** ** * ** ***
65
+
66
+ ## Intent security logic and decisions
67
+
68
+ ### 1. Intent routing comparison
69
+
70
+ Evaluate the security features of different intent delivery methods:
71
+
72
+ | Intent Delivery Method | Scope | Recommended Use Case |
73
+ |---|---|---|
74
+ | Explicit Intent (Internal) | App Private | Launching internal activities/services |
75
+ | Implicit Intent | System Wide | Launching system camera, dialer, or sharing |
76
+ | Local Broadcasts (LocalBroadcastManager) (DEPRECATED) | App Private | Internal asynchronous event routing. **Deprecated**: Use in-app observers like Kotlin Flows/SharedFlow, LiveData, or reactive patterns instead. |
77
+ | System Broadcasts | System Wide | Receiving system events (NFC, Bluetooth) |
78
+
79
+ ### 2. PendingIntent mutability flag options
80
+
81
+ Evaluate the security implications of PendingIntent mutability flags:
82
+
83
+ | Flag Name | Mutability | Recommended Use Case |
84
+ |---|---|---|
85
+ | `PendingIntent.FLAG_IMMUTABLE` | Immutable | Default for almost all PendingIntents, such as alarms and notifications |
86
+ | `PendingIntent.FLAG_MUTABLE` | Mutable | Inline notifications replies, slice actions (requires explicit target intent) |
87
+
88
+ ### 3. Intent handling and redirection logic
89
+
90
+ IF (the component receives a nested Intent as an extra) {
91
+ IF (AndroidX Core 1.9.0+ and higher is available) {
92
+ MUST construct an `IntentSanitizer` to explicitly allowlist components, actions, data, and extras.
93
+ MUST call `sanitizeByThrowing()` or `sanitizeByFiltering()` before launching.
94
+ } ELSE {
95
+ MUST verify that the nested Intent's target package matches the current application package.
96
+ MUST verify that the target component of the nested Intent is publicly exported.
97
+ }
98
+ NEVER launch the nested Intent directly without validation.
99
+ } ELSE IF (the component handles broadcasts) {
100
+ MUST rely on the system's Protected Broadcast mechanism for system events (which guarantees the sender is the system framework).
101
+ MUST protect custom receivers with signature-level permissions or use `RECEIVER_NOT_EXPORTED` for dynamic receivers to restrict the sender.
102
+ }
103
+
104
+ ### 4. PendingIntent security logic
105
+
106
+ IF (a PendingIntent is created for delivery to another application) {
107
+ MUST use `PendingIntent.FLAG_IMMUTABLE` by default.
108
+ IF (the PendingIntent must be mutable) {
109
+ MUST set the explicit target component or package name on the base `Intent`.
110
+ NEVER create an implicit, mutable `PendingIntent`.
111
+ }
112
+ }
113
+
114
+ ### 5. ContentProvider security logic
115
+
116
+ IF (the ContentProvider is only for internal app use) {
117
+ MUST set `android:exported="false"`.
118
+ } ELSE {
119
+ MUST protect it with `android:readPermission` and `android:writePermission`.
120
+ MUST set `android:grantUriPermissions="false"` unless temporary URL access is strictly required.
121
+ }
122
+
123
+ ### 6. Service caller verification logic
124
+
125
+ IF (an exported service communicates with trusted sister/partner apps) {
126
+ MUST retrieve the calling UID using `Binder.getCallingUid()` and resolve it to package names using `PackageManager.getPackagesForUid()`.
127
+ MUST verify that the calling package signature fingerprint matches your trusted certificate hash.
128
+ }
129
+
130
+ *** ** * ** ***
131
+
132
+ ## Code and configuration patterns
133
+
134
+ ### 1. Safe intent redirection (manual verification)
135
+
136
+ Validate the target of a nested intent before launching it when modern
137
+ sanitization libraries are unavailable.
138
+
139
+ - **Expected Inputs:**
140
+ - An incoming `Intent` containing a nested `Intent` extra named `EXTRA_NESTED_INTENT`.
141
+ - **Expected Outputs:**
142
+ - Launches the target component if safe; throws `SecurityException` if validation fails.
143
+
144
+
145
+ ```kotlin
146
+ fun safeIntentRedirectionManual() {
147
+ val nestedIntent = IntentCompat.getParcelableExtra(intent, "EXTRA_NESTED_INTENT", Intent::class.java)
148
+ if (nestedIntent != null) {
149
+ // 1. Check for URI permission grants to prevent URI permission bypass
150
+ val hasUriPermissionGrants = (
151
+ nestedIntent.flags and (
152
+ Intent.FLAG_GRANT_READ_URI_PERMISSION or
153
+ Intent.FLAG_GRANT_WRITE_URI_PERMISSION or
154
+ Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION or
155
+ Intent.FLAG_GRANT_PREFIX_URI_PERMISSION
156
+ )
157
+ ) != 0
158
+ if (hasUriPermissionGrants) {
159
+ throw SecurityException("Nested intent contains forbidden URI permission grant flags!")
160
+ }
161
+
162
+ val pm = packageManager
163
+ val target = nestedIntent.resolveActivity(pm)
164
+ if (target != null) {
165
+ // 2. Verify target is within the same package
166
+ if (target.packageName != packageName) {
167
+ throw SecurityException("Cross-app intent redirection is forbidden!")
168
+ }
169
+ try {
170
+ // 3. Verify target activity is exported
171
+ val info = pm.getActivityInfo(target, 0)
172
+ if (!info.exported) {
173
+ throw SecurityException("Target activity is private: ${target.className}")
174
+ }
175
+ // 4. Explicitly set the component to prevent intent interception
176
+ nestedIntent.component = target
177
+ // Safe to launch
178
+ startActivity(nestedIntent)
179
+ } catch (e: PackageManager.NameNotFoundException) {
180
+ Log.e("Security", "Failed to resolve target activity", e)
181
+ }
182
+ }
183
+ }
184
+ }
185
+ ```
186
+
187
+ <br />
188
+
189
+ ### 2. Safe intent redirection using IntentSanitizer
190
+
191
+ Filter or reject dynamic intents using AndroidX `IntentSanitizer` (AndroidX Core
192
+ 1.9.0+).
193
+
194
+ - **Expected Inputs:**
195
+ - An untrusted incoming `Intent`.
196
+ - **Expected Outputs:**
197
+ - `Intent`: A sanitized copy containing only allowlisted components, categories, and actions. Throws `SecurityException` on violations if using `sanitizeByThrowing()`.
198
+
199
+
200
+ ```kotlin
201
+ fun safeIntentRedirectionSanitizer() {
202
+ val untrustedIntent = IntentCompat.getParcelableExtra(intent, "EXTRA_NESTED_INTENT", Intent::class.java)
203
+ if (untrustedIntent != null) {
204
+ // Define the strict boundaries for allowed redirection target
205
+ val sanitizer = IntentSanitizer.Builder()
206
+ .allowComponent(ComponentName("com.example.app", "com.example.app.SafeTargetActivity")) // Explicitly allowed target
207
+ .allowAction(Intent.ACTION_VIEW) // Explicitly allowed actions
208
+ .allowDataWithAuthority("com.example.app.provider") // Allowed URI authority
209
+ .allowType("text/plain") // Allowed mime type
210
+ .allowExtra("user_display_name", String::class.java) // Safe type-enforced extras
211
+ // Note: URI permission flags are NOT allowed, so the sanitizer will automatically strip or throw on them
212
+ .build()
213
+
214
+ try {
215
+ // Option A: Throws SecurityException if the intent violates policies
216
+ val safeIntent = sanitizer.sanitizeByThrowing(untrustedIntent)
217
+ startActivity(safeIntent)
218
+ } catch (e: SecurityException) {
219
+ Log.e("SECURITY_ALERT", "Attempted launch of non-allowlisted intent blocked", e)
220
+ }
221
+
222
+ // Option B: Silently filter and launch only the authorized parts (no exception thrown)
223
+ // val filteredIntent = sanitizer.sanitizeByFiltering(untrustedIntent)
224
+ // startActivity(filteredIntent)
225
+ }
226
+ }
227
+ ```
228
+
229
+ <br />
230
+
231
+ ### 3. Custom signature permission protection
232
+
233
+ Declare a custom signature-level permission in the manifest to secure family app
234
+ communication.
235
+
236
+ - **Expected Inputs:** Manifest configuration.
237
+ - **Expected Outputs:** An activity that can only be launched by apps signed with the same developer certificate.
238
+
239
+
240
+ ```xml
241
+ <permission
242
+ android:name="com.example.snippets.permission.INTERNAL_COMMUNICATION"
243
+ android:protectionLevel="signature" />
244
+ ```
245
+
246
+ <br />
247
+
248
+
249
+ ```xml
250
+ <activity
251
+ android:name=".intents.InternalSharingActivity"
252
+ android:exported="true"
253
+ android:permission="com.example.snippets.permission.INTERNAL_COMMUNICATION">
254
+ <intent-filter>
255
+ <action android:name="com.example.snippets.ACTION_SHARE" />
256
+ <category android:name="android.intent.category.DEFAULT" />
257
+ </intent-filter>
258
+ </activity>
259
+ ```
260
+
261
+ <br />
262
+
263
+ ### 4. Safe onNewIntent lifecycle verification (warm boot protection)
264
+
265
+ Ensure that activities reusing dynamic intents (for example, in background
266
+ launch paths) apply the same strict security filters inside `onNewIntent`.
267
+
268
+ - **Expected Inputs:**
269
+ - `newIntent` (`Intent`): The newly delivered intent.
270
+ - **Expected Outputs:**
271
+ - Executes processing logic only if the new intent passes security validation.
272
+
273
+
274
+ ```kotlin
275
+ override fun onNewIntent(newIntent: Intent) {
276
+ super.onNewIntent(newIntent)
277
+
278
+ // Set the intent to ensure intent returns the new one
279
+ intent = newIntent
280
+
281
+ // Validate the intent payload
282
+ if (validateIntent(newIntent)) {
283
+ processIntentPayload(newIntent)
284
+ } else {
285
+ Log.w("SECURITY_ALERT", "Received invalid or insecure intent during warm boot")
286
+ }
287
+ }
288
+
289
+ private fun validateIntent(intent: Intent): Boolean {
290
+ return intent.hasExtra("VALID_PAYLOAD_MARKER")
291
+ }
292
+ ```
293
+
294
+ <br />
295
+
296
+ ### 5. Secure PendingIntent creation
297
+
298
+ Enforce immutability unless mutability is explicitly required.
299
+
300
+ - **Expected Inputs (Immutable):** An intent target.
301
+ - **Expected Outputs (Immutable):** A `PendingIntent` that cannot be altered by the receiver.
302
+ - **Expected Inputs (Mutable):** An intent with an explicit component set.
303
+ - **Expected Outputs (Mutable):** A mutable `PendingIntent` locked to a specific receiver component to prevent hijacking.
304
+
305
+
306
+ ```kotlin
307
+ fun createPendingIntents(context: Context) {
308
+ // 1. Secure Immutable PendingIntent (Default)
309
+ val intent = Intent(context, TargetActivity::class.java)
310
+ val pendingIntent = PendingIntent.getActivity(
311
+ context,
312
+ 0,
313
+ intent,
314
+ PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT
315
+ )
316
+
317
+ // 2. Secure Mutable PendingIntent (e.g., Notification Direct Reply)
318
+ val mutableIntent = Intent().apply {
319
+ // MUST set explicit target component to prevent redirection hijacking
320
+ component = ComponentName(context, ReplyReceiver::class.java)
321
+ }
322
+ val mutablePendingIntent = PendingIntent.getBroadcast(
323
+ context,
324
+ 0,
325
+ mutableIntent,
326
+ PendingIntent.FLAG_MUTABLE or PendingIntent.FLAG_UPDATE_CURRENT
327
+ )
328
+ }
329
+ ```
330
+
331
+ <br />
332
+
333
+ ### 6. Secure ContentProvider configuration and queries
334
+
335
+ Expose a ContentProvider securely and parameterize queries to prevent SQL
336
+ injection.
337
+
338
+ - **Expected Inputs:**
339
+ - `uri` (`Uri`): The query URI.
340
+ - `projection` (`String[]`): Columns to retrieve.
341
+ - `selection` (`String`): Query criteria.
342
+ - `selectionArgs` (`String[]`): Values mapping to selection placeholders (`?`).
343
+ - **Expected Outputs:**
344
+ - `Cursor`: Filtered query results, strictly bound to projection maps.
345
+
346
+
347
+ ```xml
348
+ <provider
349
+ android:name=".intents.SecureDataProvider"
350
+ android:authorities="com.example.snippets.provider"
351
+ android:exported="true"
352
+ android:readPermission="com.example.snippets.permission.READ_DATA"
353
+ android:writePermission="com.example.snippets.permission.WRITE_DATA"
354
+ android:grantUriPermissions="false" />
355
+ ```
356
+
357
+ <br />
358
+
359
+
360
+ ```kotlin
361
+ override fun query(
362
+ uri: Uri,
363
+ projection: Array<String>?,
364
+ selection: String?,
365
+ selectionArgs: Array<String>?,
366
+ sortOrder: String?
367
+ ): Cursor? {
368
+ val queryBuilder = SQLiteQueryBuilder()
369
+ queryBuilder.tables = tableName
370
+ // Strict projection map to prevent querying unauthorized columns
371
+ queryBuilder.projectionMap = mapOf(
372
+ "_id" to "_id",
373
+ "display_name" to "display_name"
374
+ )
375
+ // Enable strict validation (always available since minSdk is 36)
376
+ queryBuilder.setStrict(true)
377
+ queryBuilder.setStrictColumns(true)
378
+ queryBuilder.setStrictGrammar(true)
379
+
380
+ // MUST parameterize selection criteria; NEVER append selection strings directly
381
+ val db = dbHelper.readableDatabase
382
+ return queryBuilder.query(db, projection, selection, selectionArgs, null, null, sortOrder)
383
+ }
384
+ ```
385
+
386
+ <br />
387
+
388
+ ### 7. Service caller signature verification
389
+
390
+ Verify the calling application's signature before binding to a service.
391
+
392
+ - **Expected Inputs:**
393
+ - `intent` (`Intent`): The binding request intent.
394
+ - **Expected Outputs:**
395
+ - `IBinder`: Local binder instance if caller signature matches trusted partner; throws `SecurityException` otherwise.
396
+
397
+
398
+ ```kotlin
399
+ class SecureBoundService : Service() {
400
+ companion object {
401
+ // Expected SHA-256 hash of the trusted app's signing certificate (Base64 encoded)
402
+ private const val TRUSTED_PARTNER_SHA256 = "A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0U1V="
403
+ }
404
+
405
+ override fun onBind(intent: Intent): IBinder {
406
+ // Return the binder. Do NOT perform signature verification in onBind() because
407
+ // the binder connection is cached by Android, which can bypass checks on subsequent binds.
408
+ return LocalBinder()
409
+ }
410
+
411
+ private fun enforceTrustedCaller() {
412
+ val callingUid = Binder.getCallingUid()
413
+ // Allow calls from the same application
414
+ if (callingUid == Process.myUid()) {
415
+ return
416
+ }
417
+ val pm = packageManager
418
+ val packages = pm.getPackagesForUid(callingUid)
419
+
420
+ if (packages.isNullOrEmpty() || !verifySignature(pm, packages[0])) {
421
+ throw SecurityException("Access Denied: Caller signature is untrusted.")
422
+ }
423
+ }
424
+
425
+ private fun verifySignature(pm: PackageManager, packageName: String): Boolean {
426
+ try {
427
+ val trustedSha256Raw = Base64.decode(TRUSTED_PARTNER_SHA256, Base64.DEFAULT)
428
+ // API 28+ handles rotated certificates and avoids manual hashing.
429
+ // Since minSdk is 36, this is always available.
430
+ return pm.hasSigningCertificate(packageName, trustedSha256Raw, PackageManager.CERT_INPUT_SHA256)
431
+ } catch (e: Exception) {
432
+ Log.e("SECURITY_ERROR", "Verification failed for package: $packageName", e)
433
+ }
434
+ return false
435
+ }
436
+
437
+ inner class LocalBinder : Binder() {
438
+ fun doSecureWork() {
439
+ // Verify caller identity on every transaction method call
440
+ enforceTrustedCaller()
441
+ // Safe to proceed with sensitive operations
442
+ }
443
+ }
444
+ }
445
+ ```
446
+
447
+ <br />
448
+
449
+ *** ** * ** ***
450
+
451
+ ## Error handling
452
+
453
+ Handle component binding, database queries, and intent redirection failures
454
+ securely to avoid exposing internal structures.
455
+
456
+
457
+ ```kotlin
458
+ fun safeErrorHandling(callingPackage: String?) {
459
+ try {
460
+ val payload = intent.getStringExtra("DATA_EXTRA") ?: throw IllegalArgumentException("Payload parameter missing.")
461
+ // Create a specific target intent using the validated payload
462
+ val targetIntent = Intent(this, TargetActivity::class.java).apply {
463
+ putExtra("SECURE_PAYLOAD", payload)
464
+ }
465
+ startActivity(targetIntent)
466
+ } catch (e: SecurityException) {
467
+ // MUST log security violations for audit, but NEVER expose exception details to the user.
468
+ Log.e("SECURITY_ERROR", "Unauthorized component transition blocked. Calling Package: ${callingPackage ?: "Unknown"}", e)
469
+ // MUST provide generic user feedback.
470
+ showFeedbackToUser("Process request failed: Access Denied.")
471
+ } catch (e: IllegalArgumentException) {
472
+ Log.w("INTEGRITY_WARNING", "Missing intent parameter", e)
473
+ }
474
+ }
475
+ ```
476
+
477
+ <br />
478
+
479
+ // Secure handling of ContentProvider queries on the client side:
480
+ try {
481
+ val cursor = contentResolver.query(providerUri, projection, selection, selectionArgs, null)
482
+ } catch (e: SQLiteException) {
483
+ Log.e("PROVIDER_ERROR", "ContentProvider database query failed", e)
484
+ // Secure handling: prevent raw query syntax details from leaking to UI
485
+ }
486
+
487
+ *** ** * ** ***
488
+
489
+ ## Reporting guidelines
490
+
491
+ When this skill is executed to apply security hardening updates to a codebase,
492
+ the agent **MUST** generate a structured "Best Practices and Security Alignment
493
+ Update" report for the developer. The report **must** be written to the session
494
+ artifact folder (or printed in the final response) and include:
495
+
496
+ 1. **Security alignment area:** The category of improvement applied (for example, Safe Intent Redirection, Secure PendingIntent Configuration, ContentProvider Data Guarding).
497
+ 2. **Impact and priority:** The potential safety risk addressed by the update (for example, Component Hijacking Prevention, Private Data Isolation).
498
+ 3. **Scope of changes:** A list of all modified classes, XML files, and dependencies.
499
+ 4. **Implementation summary:** Concrete details of the solution (for example, "Updated nested intent parsing to use the `IntentSanitizer` API with a strict component allowlist").
500
+ 5. **Code diff:** Standard unified diffs showing the exact modifications.
501
+
502
+ ### Best practices and security alignment update template
503
+
504
+ Use the following markdown template when reporting changes to developers:
505
+
506
+ ### Best practices and security alignment update: [Security Alignment Area]
507
+
508
+ * **Improvement Description:** [Brief description of the hardening update and why it's recommended]
509
+ * **Priority Level:** [High / Medium / Low]
510
+ * **Alignment Action:** [Summary of updates, for example, converted to FLAG_IMMUTABLE]
511
+
512
+ #### Files modified
513
+ * `[Relative path to File 1]`
514
+ * `[Relative path to File 2]`
515
+
516
+ #### Implementation diff
517
+ ```diff
518
+ // Insert Unified Diff here
519
+
520
+ #### Testing and verification
521
+
522
+ 1. \[Step 1 to verify the component behaves correctly, for example, run component unit test\]
523
+ 2. \[Step 2 to verify regression safety\] \`\`\`
524
+
525
+ *** ** * ** ***
526
+
527
+ ## Antipatterns
528
+
529
+ - **NEVER** launch a nested `Intent` received from an untrusted source without verifying its target package and exported status.
530
+ - **NEVER** use sticky broadcasts (`sendStickyBroadcast`).
531
+ - **NEVER** assume an exported component is safe because it runs in a background thread or performs internal checks.
532
+ - **NEVER** expose sensitive functionalities (like SSO authentication or payment processors) to components without signature-level permission restrictions.
533
+ - **NEVER** process incoming intents in `onNewIntent` without applying the same security controls as `onCreate`.
534
+ - **NEVER** create a mutable `PendingIntent` without setting an explicit target component in the base `Intent`.
535
+ - **NEVER** use dynamic string concatenation to construct selection blocks inside a `ContentProvider` query.
536
+ - **NEVER** use `Binder.getCallingUid` inside a `BroadcastReceiver.onReceive` to identify the sender of a broadcast, as it returns the receiver's own UID, not the sender's.
537
+
538
+ ## Best Practices
539
+
540
+ - **MUST** explicitly set `android:exported="false"` for all components that don't need external communication.
541
+ - **MUST** protect all exported components with custom permissions utilizing `android:protectionLevel="signature"` when communicating between family apps.
542
+ - **MUST** validate all incoming intent extras and handle missing parameters gracefully to prevent crashes.
543
+ - **MUST** rely on the system's **Protected Broadcast** mechanism for system events (for example, boot completed, package changes), as the system prevents untrusted apps from spoofing these actions.
544
+ - **MUST** protect custom broadcasts with signature-level permissions or use `RECEIVER_NOT_EXPORTED` for dynamic receivers to restrict the sender identity.
545
+ - **MUST** call `setIntent(newIntent)` inside `onNewIntent()` before processing payloads to keep active references updated.
546
+ - **MUST** use `PendingIntent.FLAG_IMMUTABLE` by default when constructing `PendingIntent` instances.
547
+ - **MUST** protect exported `ContentProviders` with `readPermission` and `writePermission`.
548
+ - **MUST** enforce parameterized selection structures in `ContentProvider` query/update methods.
549
+ - **MUST** verify the package signature fingerprint of binding applications at runtime inside exported services.
550
+ - **MUST** use `androidx.core.content.IntentSanitizer` to sanitize incoming dynamic intents before redirection, if AndroidX Core 1.9.0+ is imported in the project.