Skip to content

Commit cbab8ab

Browse files
1technophileclaude
andcommitted
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

File tree

assets/android/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@
5959
android:label="Theengs BLE"
6060
android:allowBackup="true"
6161
android:fullBackupContent="@xml/backup_rules"
62-
android:dataExtractionRules="@xml/data_extraction_rules">
62+
android:dataExtractionRules="@xml/data_extraction_rules"
63+
android:enableOnBackInvokedCallback="false">
6364

6465
<!-- Activity -->
6566
<activity android:name="org.qtproject.qt.android.bindings.QtActivity"

0 commit comments

Comments
 (0)