Basics for System Back
summary
Android 13 introduces an ahead-of-time System Back model with a new platform API, onBackInvokedCallback, and requires apps to opt in via enableOnBackInvoked=true in the manifest; when registered the system knows before the gesture whether the app will handle Back and shows a Launcher preview otherwise. Migrate using AndroidX Activity 1.6 (or Compose’s BackHandler), move per-view logic to register/unregister callbacks on state changes (drawer example), and expect legacy onBackPressed removal in Android 14.
AI-written summary · about
chapters (16)
- 0:00Introduction to back gesture
- 0:15Predictive back goal
- 2:10Ahead-of-time model
- 3:11OnBackInvokedCallback API
- 4:22Opting into predictive back
- 5:15Jetpack libraries update
- 5:47OnBackPressedDispatcher
- 7:24Handling multiple callbacks
- 8:32Fragment back navigation
- 9:25BackHandler in Compose
- 10:02Migrating legacy back code
- 10:29Low-level API integration
- 10:59Implementing drawer layout
- 11:42Registering callbacks
- 12:27Updating callback state
- 13:10Future plans and resources
related talks
33mWhat's up with Android's back?
33mGesture navigation best practices
17mBringing Predictive Back Gestures to your App
28mBuilding for the Future of Android
43mBuilding for the Future of Android
24mUI That Connects an Android App's Inside and Outside
12mDesigning a high quality app with the latest Android features
46mOpening Keynote: Android Then & Now
