From cbab8abb2066e93e6086ea186d5a1eda3b425f79 Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Fri, 3 Jul 2026 08:50:46 -0500 Subject: [PATCH] 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 --- assets/android/AndroidManifest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/android/AndroidManifest.xml b/assets/android/AndroidManifest.xml index d5a0a3a..f855f19 100644 --- a/assets/android/AndroidManifest.xml +++ b/assets/android/AndroidManifest.xml @@ -59,7 +59,8 @@ android:label="Theengs BLE" android:allowBackup="true" android:fullBackupContent="@xml/backup_rules" - android:dataExtractionRules="@xml/data_extraction_rules"> + android:dataExtractionRules="@xml/data_extraction_rules" + android:enableOnBackInvokedCallback="false">