Skip to content

Target Android 16 (API level 36) - #6143

Merged
peachbits merged 1 commit into
developfrom
matthew/android-target-sdk-36
Aug 10, 2026
Merged

Target Android 16 (API level 36)#6143
peachbits merged 1 commit into
developfrom
matthew/android-target-sdk-36

Conversation

@peachbits

@peachbits peachbits commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

No visual changes, but this does change Android platform behavior. Device testing is in progress via QA on the test-paneer build rather than checked off here — see QA focus below.

Description

Google Play rejects app updates targeting below API 36 after Aug 30, 2026 (Asana task). The Play Console policy warning reads "App updates with these issues will be rejected."

The compliance change itself is two lines in android/build.gradle. The other three files exist because of what API 36 turns on.

Predictive back is the real payload

Targeting API 36 enables predictive back by default, and Android then stops calling onBackPressed and stops dispatching KEYCODE_BACK. React Native 0.79's ReactActivity only overrides onBackPressed and registers no OnBackInvokedCallback, so every BackHandler listener in the app would go silently dead:

  • @react-navigation/native's useBackButton — and we use the JS stack (@react-navigation/stack v6), not native-stack, so all back navigation routes through BackHandler
  • EdgeModal.tsx:123 — back no longer dismisses modals
  • useBackButtonToast.tsx:34 — the "tap again to exit" guard on the wallet list

android:enableOnBackInvokedCallback="false" opts out, keeping back behavior byte-for-byte identical to what ships today.

React Native 0.86 fixes this properly — it ships its own OnBackPressedCallback shim (its ReactActivity carries the comment "Due to enforced predictive back on targetSdk 36, onBackPressed() is disabled by default") and moves to AGP 8.12. Both the opt-out and the suppressUnsupportedCompileSdk line come back out with that upgrade. This PR exists because RN 0.86 lands after the Play deadline.

Why buildToolsVersion stays at 35.0.0

Deliberate, not an oversight. AGP 8.8.2's ToolsRevisionUtils has MIN_BUILD_TOOLS_REV = DEFAULT_BUILD_TOOLS_REVISION = 35.0.0 — and so does AGP 8.12.0, so it remains the default even after the RN upgrade. The "build-tools must be ≥ compileSdk" rule predates AGP sourcing aapt2 from Maven (com.android.tools.build:aapt2:8.8.2-12006047) rather than from the build-tools folder. Nothing in the repo shells out to zipalign/apksigner/aapt directly.

Verification

  • ./gradlew :app:assembleDebug succeeds (JDK 17)
  • aapt2 dump badging on the resulting APK confirms targetSdkVersion:'36', compileSdkVersion='36'
  • aapt2 dump xmltree confirms enableOnBackInvokedCallback(0x0101066c)=false survives manifest merge into the packaged binary manifest
  • AGP's "tested up to compileSdk 35" warning is gone from the build log
  • npm run prepare + full jest suite pass (95 suites, 571 tests)

Not verified here: the runtime opt-out on a real Android 16 device. I confirmed the flag is in the shipped manifest, but had no Android 16 phone image available. That is what the QA pass covers.

QA focus

Pushed to test-paneer. Expected result is no observable change — anything QA notices is a regression.

Requires an Android 16+ device; nothing reproduces below that. Test both gesture back and 3-button back.

  1. Back from any nested scene pops rather than exiting the app. If the opt-out failed, this breaks everywhere at once.
  2. Back dismisses modals rather than backgrounding the app.
  3. Wallet list: first back shows "tap again to exit", second logs out.

Secondary, lower risk: API 36 makes the app ignore orientation and resizability restrictions on screens ≥600dp. Our manifest sets none of those, so nothing is lost, but tablets and foldables now get free rotation and multi-window. Worth a tablet look.


Note

Medium Risk
Targeting API 36 changes platform behavior on Android 16+ devices; the predictive-back opt-out is critical—if it fails manifest merge or is ignored at runtime, back navigation could break app-wide.

Overview
Google Play compliance: compileSdkVersion and targetSdkVersion move from 35 to 36 so updates remain acceptable after the Aug 30, 2026 deadline.

Back navigation preserved: API 36 enables predictive back by default, which would break React Native 0.79’s legacy back path and silence BackHandler (navigation stack pops, modal dismiss in EdgeModal, and the wallet-list “tap again to exit” flow in useBackButtonToast). The app sets android:enableOnBackInvokedCallback="false" on <application> with an in-manifest comment until RN 0.86.

Build noise: android.suppressUnsupportedCompileSdk=36 is added because RN 0.79’s AGP 8.8.2 is only validated through SDK 35; buildToolsVersion stays at 35.0.0 per the PR rationale.

CHANGELOG documents the user-visible expectation: no change in back-button behavior.

Reviewed by Cursor Bugbot for commit e183c2f. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI lite review requested due to automatic review settings August 6, 2026 21:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the Android build configuration to target Android 16 / API 36 while minimizing build noise and preserving existing back-button behavior on React Native 0.79.

Changes:

  • Bump compileSdkVersion / targetSdkVersion to 36.
  • Suppress AGP “unsupported compileSdk” warnings while RN pins an older AGP.
  • Opt out of predictive back via manifest to keep BackHandler-based navigation working.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
android/gradle.properties Suppresses AGP warnings when compiling with SDK 36.
android/build.gradle Raises compile/target SDK to 36.
android/app/src/main/AndroidManifest.xml Disables predictive back callback to preserve legacy back behavior.
CHANGELOG.md Documents the SDK targeting change and rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread android/build.gradle
Comment on lines 3 to +6
buildToolsVersion = "35.0.0"
minSdkVersion = 28 // Edge modified from 21
compileSdkVersion = 35
targetSdkVersion = 35
compileSdkVersion = 36
targetSdkVersion = 36
Comment thread android/gradle.properties
Comment on lines +48 to +51
# React Native 0.79 pins Android Gradle Plugin 8.8.2, which was only tested up
# to compileSdk 35. Building against 36 works, but AGP warns on every build.
# Drop this once the React Native 0.86 upgrade brings AGP 8.12.
android.suppressUnsupportedCompileSdk=36
Google Play rejects app updates that target below API 36 after Aug 30, 2026.

Bumping compileSdk and targetSdk to 36 is the whole compliance change, but
API 36 also enables predictive back by default, and Android then stops
calling onBackPressed or dispatching KEYCODE_BACK. React Native 0.79's
ReactActivity only overrides onBackPressed and registers no
OnBackInvokedCallback, so every BackHandler listener would go dead:
react-navigation's back handling, EdgeModal dismissal, and the
useBackButtonToast exit guard. Opt out of predictive back to keep the back
button behaving as it does today.

React Native 0.86 ships an OnBackPressedCallback shim for this and moves to
AGP 8.12, so both the opt-out and the compileSdk warning suppression come
back out with that upgrade.
@peachbits
peachbits force-pushed the matthew/android-target-sdk-36 branch from eea4fe4 to e183c2f Compare August 10, 2026 17:43

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

@peachbits
peachbits merged commit 14190e0 into develop Aug 10, 2026
7 checks passed
@peachbits
peachbits deleted the matthew/android-target-sdk-36 branch August 10, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants