Commit cbab8ab
fix(android): keep system back working on Android 16 (targetSdk 36)
On Android 16 / targetSdk 36, android:enableOnBackInvokedCallback defaults
to true, so the OS routes the back gesture and the 3-button back through
OnBackInvokedDispatcher instead of dispatching KEYCODE_BACK. Qt does not
register an OnBackInvokedCallback, so the platform's default callback
finishes the activity and the app closes from any sub-screen, instead of
navigating back via MobileApplication.qml's Keys.onBackPressed -> backAction().
Opt out of the predictive back callback to restore legacy KEYCODE_BACK
delivery. Verified on a Pixel 8a (Android 16): edge-swipe and 3-button back
now return to the previous screen; double-back-to-exit on the main screen
still works.
Fixes #152
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent d203e28 commit cbab8ab
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
0 commit comments