
Android Navigation Event Back Handling
Guides an agent to write Predictive Back and back-gesture handling in Compose Android apps using androidx.navigationevent
- Repository
- android/skills
- Stars
- 10,278
- Licence
- Apache-2.0
- Files
- 5 files
What it does
This skill gives an AI coding agent specialized instructions for handling the Android back gesture in apps built with Jetpack Compose. Once installed, the agent knows how to set up the NavigationEvent library, intercept back swipes and button presses, scope handlers for tabs, ViewPagers and dialogs, and migrate older back-handling code (such as BackHandler or OnBackPressedCallback) on SDK 36 and above. It reads bundled reference guides and points the developer toward the correct patterns and common crash fixes.
Great for
- Android developers building Compose apps who need Predictive Back support
- Teams migrating older back-handling code to NavigationEvent
- Developers debugging back-gesture crashes such as StackOverflowError in ComponentActivity setups
Skip it if
- Apps using Android Views instead of Compose, because the skill is explicitly scoped to Compose only
- Non-developers looking for a finished app, since this only guides code changes in an existing project
Try asking
- “Migrate my BackHandler usage in this Compose screen to NavigationEvent”
- “Set up parent-child back dispatchers for my ViewPager with tabs”
- “Why does my app crash on launch after I overrode navigationEventDispatcher in MainActivity?”
- “Add a NavigationBackHandler that animates my bottom sheet during a back swipe”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 5 original files, the Apache-2.0 licence and an attribution note.
navigation-event.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip navigation-event.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip navigation-event.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Point the agent at the specific screen or Activity you want to change so it follows the matching guide section.
- If you use Navigation 3, tell the agent so it uses the built-in back support instead of low-level dispatchers.
- Review the dependency and compileSdk changes it proposes, since they affect your build configuration.
What's inside
- references/android/guide/navigation/navigation-event/dispatcher.md
- references/android/guide/navigation/navigation-event/handle-back.md
- references/android/guide/navigation/navigation-event/index.md
- references/android/guide/navigation/navigation-event/setup.md
- SKILL.md
Redistributed unmodified from android/skills under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.