android-permissions-activity-results
Installation
SKILL.md
Android Permissions Activity Results
When To Use
- Use this skill when the request is about: android permission request flow, activity result api android, camera permission in android app.
- Primary outcome: Use modern permission requests, Activity Result APIs, and capability-gated UX in Android flows.
- Read
references/patterns.mdwhen you need the picker-vs-permission matrix or API-level behavior checklist. - Read
references/scenarios.mdfor photo picker, notification permission, and limited media access examples. - Handoff skills when the scope expands:
android-media-files-sharingandroid-testing-ui
Workflow
- Start with the capability the user needs, not the permission name: photo picker, document picker, camera capture, or notification opt-in often avoids broader runtime permissions.
- Choose the right Activity Result contract and keep the launcher in a stable lifecycle owner such as an activity, fragment, or remembered Compose launcher.
- Model the full permission state space explicitly: granted, denied, permanently denied, limited/selected access, one-time access, and settings-based recovery.
- Account for API-level differences such as
POST_NOTIFICATIONSon Android 13+, approximate vs precise location, background location as a separate flow, and Android 14 selected-photos access. - Re-check capability on return from settings or picker flows, then validate rotation, process death, and denial recovery instead of assuming the happy path.
Guardrails
- Treat loading, empty, error, offline, and permission-denied states as first-class UI states.
Related skills
More from krutikjain/android-agent-skills
android-di-hilt
Wire Android dependency injection with Hilt, scopes, testing overrides, and module ownership boundaries.
194android-testing-unit
Write fast, focused Android unit tests for reducers, use cases, repositories, and lifecycle-safe state holders.
187android-kotlin-core
Use Kotlin idioms safely in Android apps, including nullability, data classes, sealed types, extension functions, and collection pipelines.
185android-gradle-build-logic
Shape Android build logic with Gradle, version catalogs, plugins, convention patterns, and toolchain compatibility.
185android-networking-retrofit-okhttp
Build Android networking stacks with Retrofit, OkHttp, interceptors, API contracts, and resilient error handling.
183android-coroutines-flow
Use coroutines, Flow, structured concurrency, dispatchers, and cancellation-safe Android async pipelines.
181