Repository navigation
chore(android): targetSdk 36 - #742
Merged
Merged
Conversation
ENG-605 PR5. targetSdkVersion 35 -> 36 in android/build.gradle; compileSdk/buildTools were already 36 (#739), minSdk 26 unchanged. Sets android:enableOnBackInvokedCallback="false" on <application>. Android 16 enables predictive back for apps targeting 36 and stops calling Activity.onBackPressed(); RN 0.77.1's ReactActivity only overrides onBackPressed() (the OnBackPressedCallback registration landed in RN 0.80), and that override is the only path that emits the JS hardwareBackPress event. This app is on @react-navigation/stack (JS stack) and react-native-modal's onBackButtonPress, both driven by that event, so without the opt-out a back press on an Android 16 device would leave the app from any screen. Remove the attribute when RN is bumped to 0.80+. Everything else in the Android 16 audit (edge-to-edge + adjustResize, screenOrientation on large screens, StatusBar backgroundColor no-ops, FGS/exact-alarm/NFC permissions, 16 KB packaging from #622) is a documented no-change; see the PR body. Co-Authored-By: Claude Fable 5.1 <[email protected]>
islandbitcoin
force-pushed
the
chore/android-targetsdk-36
branch
from
September 24, 2026 23:24
4278f47 to
b6a8c1e
Compare
islandbitcoin
changed the base branch from
chore/android-edge-to-edge-prep
to
main
September 24, 2026 23:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ENG-605 PR5.
targetSdkVersion35 → 36 (android/build.gradle:8). compileSdk / buildTools were already 36 (#739); minSdk 26 unchanged. Based on #741 (chore/android-edge-to-edge-prep) withorigin/mainmerged in so the flip sits on compileSdk 36; once #741 lands this diff collapses to the two Android files below.One behaviour change beyond the version bump came out of the audit:
android:enableOnBackInvokedCallback="false"on<application>(AndroidManifest.xml:30). Details in row 3.Android 16 behaviour audit (this tree, RN 0.77.1,
@react-navigation/stack6)windowOptOutEdgeToEdgeEnforcementis disabled. With the decor view no longer fitting system windows,windowSoftInputMode="adjustResize"stops shrinking the content view for the IME (the IME arrives as an inset instead).AndroidManifest.xml:36adjustResize. IME height is already applied fromuseAnimatedKeyboardviauseKeyboardPaddingStyle(app/hooks/use-keyboard-padding.ts:64) onchat/messages.tsx,GroupChat/SupportGroupChat.tsx,topup-cashout-flow/BridgeAddExternalAccount.tsx;Screenpadsinsets.bottom(app/components/screen/screen.tsx:47). Core-Modal-hosted forms (BridgeKycModal,quick-zap-modal, the three GroupChat modals) keep the dialog window's ownSOFT_INPUT_ADJUST_RESIZE+fitsSystemWindowsroot.TextInputinsideScreenthat have no IME hook (phone-login-input,phone-registration-input,*-validation,email-*-initiate,username-set,contacts-detail,TopupDetails,account-screen) previously relied on the window resize; they are all short forms with the input in the top half, so the keyboard should not cover them — this is the "keyboard on forms" item in the device sweep.screenOrientation,resizableActivity,min/maxAspectRatio,setRequestedOrientation()are ignored on ≥600dp-sw displays (tablets, unfolded foldables, desktop windowing).AndroidManifest.xml:35screenOrientation="portrait",:33configChangesincludesorientation|screenSize(activity is not recreated on rotate; RN relayouts).resizableActivity, noPROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY; the latter is the documented temporary opt-out if the device pass finds breakage, and it stops working at target 37). Phones (<600dp) stay portrait-locked. On large screens the app will rotate; screens that readDimensions.get()at module load keep stale portrait numbers after a rotate:components/scan/QRCamera.tsx:12(QR scanner viewportwidth/height),components/currency-keyboard/currency-keyboard.tsx:9(keypad rowheight),contexts/Flashcard.tsx:32(NFC "Ready to scan" sheet width),screens/get-started-screen/get-started-screen.tsx:28,screens/authentication-screen/username-set.tsx:35,screens/earns-screen/earns-section.tsx:26,screens/invite-friend/InviteFriendSuccess.tsx:16,components/card/EmptyCard.tsx:18,components/advanced-mode-modal/advanced-mode-modal.tsx:29,components/home-screen/QuickStart.tsx:31,components/nostr-quickstart/index.tsx:16. Camera capture (account-upgrade-flow/PhotoUploadField.tsx, vision-camera 4.7.3, nooutputOrientationprop) and the QR scanner will render the preview rotated/letterboxed in landscape. NoIdentityCapturescreen exists on this branch. Tablet/foldable is a device-pass item, not a phone regression.onBackPressed()is no longer called andKEYCODE_BACKis no longer dispatched; back goes throughOnBackInvokedDispatcheronly.ReactActivity.java:98only overridesonBackPressed()(noOnBackPressedCallback); that is the sole path that emits JShardwareBackPress. Consumers of that event in this tree:@react-navigation/stack(JS stack, 138 imports — every stack pop on Android),react-native-modal'sonBackButtonPress(node_modules/react-native-modal/dist/modal.js:108; used byCashoutAccountPicker.tsx:76,ChooseWallet.tsx:137,key-modal.tsx:75,import-nsec-modal.tsx:32), coreModalonRequestClose(18 usages, native dialog — unaffected). The only nativeOnBackPressedCallbackregistrations are react-native-screens' search bar (FragmentBackPressOverrider.kt), which this app does not use. Nothing else registers with the androidx dispatcher, so on Android 16 a back press would fall through to the system default and leave the app from any screen;onBackButtonPresson everyreact-native-modalsheet would never fire.android:enableOnBackInvokedCallback="false"on<application>— the opt-out Google documents for exactly this case ("if your app intercepts the back event and you haven't yet migrated"). It restores the legacyonBackPressed()dispatch on Android 16, so RN'sBackHandlerkeeps working; Android ≤15 is unchanged (the attribute already defaulted to false there). Cost: no predictive-back animation. Remove it when RN is bumped to 0.80 or later: upstreamReactActivity.javafrom 0.80.0 registers anOnBackPressedCallbackwith the comment "Due to enforced predictive back on targetSdk 36, 'onBackPressed()' is disabled by default" (react/react-native#51096; follow-up #54958 in Dec 2025 fixes re-enabling afterinvokeDefaultOnBackPressed). #741's "RN 0.77 handles it" note was wrong for this reason. Hardware back on the cashout account picker and on the bank-account screen's remove/defaultAlert.alertdialogs (bank-accounts-screen.tsx:216,249,406, native — unaffected) are in the device sweep regardless.Window.setStatusBarColor/setNavigationBarColorare no-ops under enforced edge-to-edge (already true on Android 15 at target 35; 16 removes the opt-out).app/app.tsx:85<StatusBar backgroundColor="#000" barStyle="light-content">(Android only);screens/chat/NIP17Chat.tsx:177<StatusBar translucent backgroundColor="transparent">;screens/featured-profile-view/FeaturedProfileView.tsx:152<StatusBar barStyle="light-content" backgroundColor={VIEW_COLORS.background}>. NoStatusBar.setBackgroundColor()/setTranslucent()imperative calls anywhere;Modal statusBarTranslucentunused.backgroundColorbecomes a no-op on 15+ (it already is at target 35) but is still honoured on Android ≤14, so removing it would regress the black bar there.barStyle(icon tint viaWindowInsetsController) keeps working everywhere.translucentonNIP17Chatsets an insets listener that zeroes the top inset (WindowUtil.kt:20); under edge-to-edge the window is already behind the bar andScreen'sSafeAreaViewpads the top, so it is redundant but harmless. RN 0.77.1'sStatusBar.jsemits no edge-to-edge warning for any of these (the warning landed in later RN), so there is nothing to strip to keep logcat clean.FOREGROUND_SERVICE_*types (34+), exact alarms,BLUETOOTH_*,READ_MEDIA_*, NFC.AndroidManifest.xml:5-18): INTERNET, CAMERA, ACCESS_FINE_LOCATION, USE_BIOMETRIC, USE_FINGERPRINT, ACCESS_WIFI_STATE, ACCESS_NETWORK_STATE, VIBRATE, READ_CONTACTS;READ_PHONE_STATEandUSE_FULL_SCREEN_INTENTremoved viatools:node="remove". Merged release manifest (build/intermediates/merged_manifests/release/…/universal/AndroidManifest.xml, sources frommanifest-merger-release-report.txt):FOREGROUND_SERVICE+RECEIVE_BOOT_COMPLETED←androidx.work:work-runtime:2.9.0;SCHEDULE_EXACT_ALARM←app.notifee:core(trigger notifications; the app never callscreateTriggerNotification, so the alarm permission is declared but unused);POST_NOTIFICATIONS←firebase-messaging:25.0.1(already requested at runtime,app/utils/notifications.ts:58);NFC← react-native-nfc-manager;WRITE_EXTERNAL_STORAGE← breez-sdk-liquid / react-native-fs (inert since API 30). One foreground service:app.notifee.core.ForegroundServicewithforegroundServiceType="shortService"(declared by notifee-core, satisfies the API 34 type requirement; not started by app code —notifee.registerForegroundServiceis unused);androidx.work'sSystemForegroundServicecarries no type and is only used by WorkManager's expedited path. NoFOREGROUND_SERVICE_*typed permission, noUSE_EXACT_ALARM, noBLUETOOTH*, noREAD_MEDIA_*.MediaStore#getVersion()becomes per-app at 36; not called in this tree.dataSync/mediaProcessingtimeouts,SYSTEM_ALERT_WINDOWno longer exempting FGS starts) do not touchshortService. Note for the record:android.permission.NFCreaches the release manifest only via the library's manifest merge (android/app/src/debug/AndroidManifest.xml:8declares it explicitly, main does not) — pre-existing, works, listed so nobody "fixes" the asymmetry blindly. Plaid'sLinkActivity(adjustPan,singleInstance) is the SDK's own and unaffected.android/app/build.gradle:161-164packaging { jniLibs { useLegacyPackaging = false } },AndroidManifest.xml:29android:extractNativeLibs="false", NDK 27.1.12297006 (android/build.gradle:9), R8 8.7.18, AGP/RN 0.77 defaults (noandroid.bundle.enableUncompressedNativeLibsingradle.properties— that property was removed in AGP 8.x;useLegacyPackaging=falseis its replacement).ScheduledExecutorService.scheduleAtFixedRatereplays at most one missed run;MediaStore#getVersion()per-app; safer-intents enforcement is opt-in viaintentMatchingFlags; JobScheduler quotas; Bluetooth bond-loss intents.scheduleAtFixedRatein app code; no Bluetooth; deep links are inboundflash://only (AndroidManifest.xml:43-55).Build proof
Production bundle (
npx react-native bundle --platform android --dev false …, 18,172,501 bytes) followed by:assembleRelease: BUILD SUCCESSFUL in 2m 37s, 2223 tasks executed.app-arm64-v8a-release.apk= 105,084,996 bytes (105,084,204 at target 35 in chore(android): compileSdk 36 (target stays 35) #739, +792 B; universal 275,692,877). Merged manifest carriesandroid:targetSdkVersion="36"andenableOnBackInvokedCallback="false".assembleDebugarm64 (device-test path): BUILD SUCCESSFUL in 1m 41s.app-arm64-v8a-debug.apk= 140,939,583 bytes (140,939,483 in chore(android): compileSdk 36 (target stays 35) #739).--warning-mode alloutput is the same set as chore(android): compileSdk 36 (target stays 35) #739:jcenter()Gradle-9 deprecation (6, from librarybuild.gradles),package=in source manifests (geetest-module, notifee, aes-crypto), Kotlin deprecationw:lines in react-native-webview / vision-camera / screens / plaid (library code), and the 8android.targetSdk using custom value: 36lines from the firebase/notifee modules picking up the new value.yarn tsc:checkclean;yarn test: 120 suites, 1187 passed, 1187 total (1185 on chore(ui): prepare every screen for Android 16 forced edge-to-edge #741; +2 fromorigin/main).Device sweep (before this ships in a release)
Device reality check first. Note the OS version of the test Pixel in the results. Every "Android 16" behaviour in the table above (predictive back opt-out, enforced edge-to-edge without opt-out, ignored
screenOrientationon large screens) is gated on running on Android 16, so it can only be confirmed on a Pixel 8 Pro on Android 16 or an API 36 emulator (sdk_gphone64_arm64, system image "Android 16.0 (Baklava)"). There is no developer option that forces Android 16 edge-to-edge on an Android 15 device (the "Force edge-to-edge" toggle does not exist); an Android 15 device only validates the target-35 edge-to-edge path, which #741 already prepared for. Run the sweep on both if available: Android 15 (regression) and Android 16 (new behaviour).Cover gesture nav and 3-button nav on each Android device.
Bottom-anchored screens (content clear of nav bar, no double gap, keyboard does not cover the field in focus):
CashoutDetails,CashoutConfirmation,TopupDetails,BankTransfer(expect the cosmetic extra nav-bar gap chore(ui): prepare every screen for Android 16 forced edge-to-edge #741 flagged; note whether it is acceptable)BridgeAddExternalAccount: keyboard up → bottom field and submit reachable;BridgeExternalAccountWebView)currency-keyboard,ChooseWalletsheet, confirmation)messages,SupportGroupChat): composer on the nav-bar inset at rest; with Gboard + suggestion strip up, composer sits on the strip, no gap, no overlapBottom sheets (last row / primary button clear of the nav bar, designed padding intact, not floating twice the inset):
CashoutAccountPicker(32 + inset)bank-accounts-screen(remove / set default / KYCBridgeKycModal)contact-modal,reports-modal,modal-tooltip,earns-quizAccountCreateModal,CashWalletCutoverModalsit directly on the tab bar (no second inset band)Modalsheets with keyboard up:BridgeKycModal,quick-zap-modal,CreateGroupModal,GroupInfoModal,GroupMembersModal(watch for a double bottom gap on Android; chore(ui): prepare every screen for Android 16 forced edge-to-edge #741 leftinsets.bottom + 16in place pending this check)Keyboard on forms (no IME hook, relied on
adjustResizebefore): phone login/registration input + validation, email login/registration initiate,username-set,contacts-detail,TopupDetails,account-screen— field in focus and its primary button stay visible.Hardware / gesture back (the
enableOnBackInvokedCallback="false"row): on Android 16 specifically —CashoutAccountPickercloses the sheet (onBackButtonPress), second back pops the screenChooseWallet,key-modal,import-nsec-modalcloses the sheetAlert.alertdialog dismisses the dialog onlyIntegrations:
contexts/Flashcard.tsx,modal-nfc)PhotoUploadField, vision-camera) and QR scanner (QRCamera) — preview fills the viewport, no letterboxingapp.tsx,FeaturedProfileView); on an Android ≤14 device the black bar still paintsLarge screen / foldable (if available, tablet or unfolded Fold on Android 16): rotate to landscape on: QR scanner, keypad, NFC sheet, get-started carousel, earns section. Record which break; decide then whether to add
PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY(temporary, dies at target 37) or fix the module-loadDimensions.get()reads.0.7.2 regression list:
🤖 Generated with Claude Code