Target Android 16 (API level 36) - #6143
Conversation
There was a problem hiding this comment.
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/targetSdkVersionto 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.
| buildToolsVersion = "35.0.0" | ||
| minSdkVersion = 28 // Edge modified from 21 | ||
| compileSdkVersion = 35 | ||
| targetSdkVersion = 35 | ||
| compileSdkVersion = 36 | ||
| targetSdkVersion = 36 |
| # 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.
eea4fe4 to
e183c2f
Compare
There was a problem hiding this comment.
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.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
No visual changes, but this does change Android platform behavior. Device testing is in progress via QA on the
test-paneerbuild 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
onBackPressedand stops dispatchingKEYCODE_BACK. React Native 0.79'sReactActivityonly overridesonBackPressedand registers noOnBackInvokedCallback, so everyBackHandlerlistener in the app would go silently dead:@react-navigation/native'suseBackButton— and we use the JS stack (@react-navigation/stackv6), not native-stack, so all back navigation routes throughBackHandlerEdgeModal.tsx:123— back no longer dismisses modalsuseBackButtonToast.tsx:34— the "tap again to exit" guard on the wallet listandroid: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
OnBackPressedCallbackshim (itsReactActivitycarries 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 thesuppressUnsupportedCompileSdkline come back out with that upgrade. This PR exists because RN 0.86 lands after the Play deadline.Why
buildToolsVersionstays at 35.0.0Deliberate, not an oversight. AGP 8.8.2's
ToolsRevisionUtilshasMIN_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 sourcingaapt2from Maven (com.android.tools.build:aapt2:8.8.2-12006047) rather than from the build-tools folder. Nothing in the repo shells out tozipalign/apksigner/aaptdirectly.Verification
./gradlew :app:assembleDebugsucceeds (JDK 17)aapt2 dump badgingon the resulting APK confirmstargetSdkVersion:'36',compileSdkVersion='36'aapt2 dump xmltreeconfirmsenableOnBackInvokedCallback(0x0101066c)=falsesurvives manifest merge into the packaged binary manifestnpm 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.
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:
compileSdkVersionandtargetSdkVersionmove 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 inEdgeModal, and the wallet-list “tap again to exit” flow inuseBackButtonToast). The app setsandroid:enableOnBackInvokedCallback="false"on<application>with an in-manifest comment until RN 0.86.Build noise:
android.suppressUnsupportedCompileSdk=36is added because RN 0.79’s AGP 8.8.2 is only validated through SDK 35;buildToolsVersionstays 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.