●MCP — Rork now lets you add and manage your own MCP servers inside Plugins (11/21)●2.5 ROUTE — From 12/1, apps calling gemini-2.5-flash are routed to 3.5 Flash-Lite and billed at its rates (9 days left)●CHANNEL — Users report Android notification channel reads and writes failing in Expo Go●NEW — New: three clues to check before replying to a stuck-on-splash review●EXPORT — Export your projects before you downgrade or cancel a plan●SONNET 4.5 — Apps that call Sonnet 4.5 through the API should switch before it retires on 11/30●MCP — Rork now lets you add and manage your own MCP servers inside Plugins (11/21)●2.5 ROUTE — From 12/1, apps calling gemini-2.5-flash are routed to 3.5 Flash-Lite and billed at its rates (9 days left)●CHANNEL — Users report Android notification channel reads and writes failing in Expo Go●NEW — New: three clues to check before replying to a stuck-on-splash review●EXPORT — Export your projects before you downgrade or cancel a plan●SONNET 4.5 — Apps that call Sonnet 4.5 through the API should switch before it retires on 11/30
Predictive back on Android 16: after targetSdk 36, migrate now or keep the opt-out?
Targeting API 36 turns predictive back on by default and stops onBackPressed from firing. Expo already opts you out by default, so here is how to find the apps that drifted from that default, and how to keep the opt-out from vanishing on the next prebuild.
After bumping targetSdkVersion to 36, the preview screen looked different when I swiped in from the edge. The screen shrank slightly and revealed what was behind it. That is Android's predictive back animation.
That part I expected. What stopped me was what came next. A swipe I meant as "go back to the grid" was being treated as "leave the app."
The React Native announcement says BackHandler keeps working. And it did keep working. Yet the outcome of the back gesture had changed. It took me a while to understand how both can be true — and, more embarrassingly, why an Expo project should not have behaved this way in the first place.
The Google Play deadline for targeting API level 36 (August 31, 2026, or November 1 if you requested an extension) is behind us. If you are still shipping updates, your app almost certainly targets 36 now. This piece is about the decision that is left: when, and how far, to go with real predictive back support. Everything below was checked against the official docs as of November 2026, with Expo SDK 58 as the current release.
"BackHandler still works" and "back navigation is unchanged" are different claims
React Native 0.81 absorbed that change so the JS-side BackHandler keeps firing. The community announcement states that onBackPressed is no longer called, that BackHandler should continue to work, and that custom native back handling may need a manual move to OnBackPressedDispatcher.
What I misread was the scope of "BackHandler still works." What keeps working is the handler you registered yourself on hardwareBackPress. Screens where you registered nothing — the ones that leave back navigation to your navigation library — are not covered by that promise.
React Navigation 7.x does not support predictive back yet. Its getting started guide says you need to disable it for the system back gesture to work properly, and shows android:enableOnBackInvokedCallback="false". On the Expo side there are reports of stack back navigation breaking under predictive back, and real support is being built into the newer native stack in react-native-screens.
So the thing that breaks is not the BackHandler you wrote. It is the code you never wrote, which is why rereading your own source gives you no reason for the failure.
Expo already opts you out by default
What I realized only after digging was that the first document I should have read was Expo's app config reference, not Android's behavior changes page.
In the SDK 54 release notes, Expo disabled predictive back by default in all projects and made it opt-in through android.predictiveBackGestureEnabled in app.json. The current app config reference for SDK 58 still lists the default as false.
I also read the plugin itself. The PredictiveBackGesture module in @expo/config-plugins writes android:enableOnBackInvokedCallback onto the <application> element on every prebuild. The value is "true" only when predictiveBackGestureEnabled is true; anything else becomes "false". It never touches <activity>.
That gives you three conclusions:
An Expo (CNG) project with no setting at all keeps the old back behavior, even at targetSdk 36.
If back navigation changed, some setting has drifted from that default.
There are only three places to look: predictiveBackGestureEnabled: true in app.json, a hand-managed manifest under android/, or a leftover value on an <activity>.
My case was one of those three. Starting from the OS docs and assuming "Android 16 broke this" was, I think, the long way around.
Before reading what the OS changed, I check whether my own settings are still at their defaults. That ordering is one I intend to keep for the next big Android change too.
One more note. The SDK 54 notes said Expo planned to flip the default on in SDK 55 or 56. As of November 2026, the SDK 58 reference still says false. That single default is worth rechecking on every upgrade.
✦
Thank you for reading this far.
Continue Reading
What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.
WHAT YOU'LL LEARN
✦See that Expo (SDK 54 and later) already opts out by default, so back navigation only changes in apps where some setting drifted from that default
✦Compare app.json, the manifest application tag, and the manifest activity tag with one script, and know which apps actually need a device check
✦Split the opt-out between Expo's own setting and a tiny config plugin so it survives every prebuild
Secure payment via Stripe · Cancel anytime
✦
Unlock This Article
Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.
Treat it as not called — that is the Android 16 change
Anything that handles back the AndroidX way works with or without the opt-out. What the flag rolls back is the OS animation and the new callback path. If a native module of yours overrides onBackPressed(), the flag does not save it; that code needs to move to OnBackPressedDispatcher.
The flag can live on <application> or <activity>, and the activity value wins when both exist. Expo's built-in plugin only writes <application>, so a true left on an <activity> from some earlier experiment keeps predictive back on for that screen alone.
Tracing a back-navigation symptom to its cause
Here are the symptoms you will actually see on a device, in the order I would check them.
Symptom
Likely cause
How to check
Fix
Going back mid-stack closes the app
Predictive back is on and the navigation library has not caught up
grep predictiveBackGestureEnabled in app.json and enableOnBackInvokedCallback in the manifest
Remove the true and return to the default false
Only one screen behaves differently
A leftover value on an <activity>
Look for the attribute on the <activity line
Strip it with the config plugin below
You fixed the manifest and the next build undid it
Since SDK 57, expo prebuild regenerates android/ by default, and EAS Build runs prebuild for CNG projects
Is the fix in app.json or a plugin?
Stop hand-editing; move it to app.json and a plugin
Only your own native module's back handling is dead
It overrides onBackPressed(), which is not called at targetSdk 36
grep -rn "onBackPressed" android/ modules/
Move to OnBackPressedDispatcher and OnBackPressedCallback
Fine in Expo Go, broken in a development build
Expo Go does not apply your app.json Android settings
Are you testing in a dev build or a store build?
Always verify in a development build
The first two rows take minutes. In my experience, the time goes into not knowing where to look, not into the checking itself.
What is left after the deadline, and what can wait
With the deadline past, I assume the bump to 36 is done. The remaining work splits cleanly by whether there is a reason to hurry.
Work
Priority now
Why
Shipping at targetSdkVersion 36
Top priority if not done
You cannot publish updates without it
Edge-to-edge insets
Top priority if not done
Layouts visibly break
Confirming the opt-out is in effect
This week
Minutes of work, prevents back-navigation accidents
Migrating native onBackPressed() overrides
This week, if you have any
The opt-out does not cover them
Full predictive back support in navigation
Put it on the roadmap
Waiting for navigation libraries means less rework
I decide this by which way the risk runs. A change that blocks submission cannot be undone after the fact. Keeping the old back animation for a while costs something, but that cost is recoverable.
Changes that block shipping go in this week; changes that reshape the experience go on the roadmap. Keeping the two out of the same week turned out to be the fastest way to finish both.
There are three places the opt-out can live, and which one you choose decides whether it survives the next prebuild.
Method
Scope
After prebuild
When it fits
android.predictiveBackGestureEnabled in app.json
<application>
Rewritten every time
Any Expo (CNG) project
Your own config plugin
Whatever the plugin touches, <activity> included
Applied every time
Cleaning up activity-level values
Hand-editing AndroidManifest.xml
The element you edited
Gone under the SDK 57+ default
Bare React Native without prebuild only
The rule I settled on: in an Expo project, leave <application> to Expo's setting and use your own plugin only for <activity>, which Expo never touches. If two plugins write the same attribute, you end up worrying about which one runs last, forever.
Narrow the target with a script before touching a device
With several apps, tapping through every screen on a device is not realistic. So I wrote a Node script that reads the three places — app.json, the manifest <application>, and the manifest <activity> — and reports the value that is actually in effect. Pass app roots as arguments.
// audit-back.mjs — compare back handling, app.json, and AndroidManifest for each appimport { readdirSync, readFileSync, statSync, existsSync } from 'node:fs';import { join, basename } from 'node:path';const roots = process.argv.slice(2);function walk(dir, out = []) { if (!existsSync(dir)) return out; for (const name of readdirSync(dir)) { // Skip generated code and deps; android/ is read separately as a manifest if (['node_modules', '.git', 'android', 'ios'].includes(name)) continue; const p = join(dir, name); if (statSync(p).isDirectory()) walk(p, out); else if (/\.(ts|tsx|js|jsx)$/.test(name)) out.push(p); } return out;}const readJson = (p) => (existsSync(p) ? JSON.parse(readFileSync(p, 'utf8')) : null);// application and activity have different precedence, so return both (activity wins)function readManifest(path) { if (!existsSync(path)) return null; const xml = readFileSync(path, 'utf8'); const pick = (tag) => { const m = xml.match(new RegExp(`<${tag}\\b[^>]*>`, 's')); const a = m?.[0].match(/android:enableOnBackInvokedCallback\s*=\s*"(true|false)"/); return a ? a[1] : null; }; return { application: pick('application'), activity: pick('activity') };}for (const root of roots) { const pkg = readJson(join(root, 'package.json')) ?? {}; const deps = { ...pkg.dependencies, ...pkg.devDependencies }; const nav = Object.keys(deps).some((d) => d.startsWith('@react-navigation/') || d === 'expo-router'); const backHandler = walk(root).filter((f) => /BackHandler/.test(readFileSync(f, 'utf8'))).length; // In Expo (CNG), prebuild writes the app.json value to <application> every time. Unset means false const app = readJson(join(root, 'app.json')); const expoValue = app ? String(app.expo?.android?.predictiveBackGestureEnabled === true) : null; const mf = readManifest(join(root, 'android/app/src/main/AndroidManifest.xml')); let effective, source; if (mf) { effective = mf.activity ?? mf.application ?? 'unset'; source = mf.activity ? 'manifest<activity>' : mf.application ? 'manifest<application>' : 'manifest unset'; } else if (expoValue !== null) { effective = expoValue; source = 'app.json, before prebuild'; } else { effective = 'unknown'; source = 'nothing to read'; } const enabled = effective === 'true' || effective === 'unset'; // unset means enabled by default on API 36 const drift = mf && expoValue !== null && mf.application !== expoValue; const flag = drift ? 'DRIFT' : enabled && (nav || backHandler > 0) ? 'REVIEW' : 'ok'; console.log( `${flag.padEnd(6)} ${basename(root).padEnd(12)} predictive=${effective.padEnd(5)} ` + `(${source}) nav=${nav ? 'yes' : 'no '} BackHandler=${backHandler}` );}
It reads <activity> before <application> to match the OS precedence. DRIFT means the manifest and app.json disagree, so the manifest will be overwritten on the next prebuild.
I built five sample projects with different setups and ran it on Node 22:
wallpaper-a: enabled in app.json — a true from testing that was never reverted.
wallpaper-b: plain Expo defaults. Nothing to check here.
wallpaper-c: <application> says false, but an <activity> still says true. This is what "only one screen is weird" looks like.
healing-d: someone hand-wrote true into the manifest while app.json stayed at the default. The next prebuild will flip it back to false.
bare-e: bare React Native without prebuild and no value set. On API 36, predictive back is on.
An ok row does not mean "never look." It means "this change introduces no new way to break." If you build config in app.config.js, the script cannot read the value; check android.predictiveBackGestureEnabled in the output of npx expo config --type public instead.
A config plugin that only cleans up activity-level values
Since <application> is left to Expo, the plugin has exactly one job: remove the activity-level value Expo never touches.
// plugins/with-back-invoked-activity-cleanup.js// Leave <application> to Expo's built-in android.predictiveBackGestureEnabled,// and only strip the activity-level values that would override itconst { withAndroidManifest } = require('@expo/config-plugins');function removeActivityBackInvokedFlags(androidManifest) { const app = androidManifest.manifest.application?.[0]; if (!app) throw new Error('No application element found'); const removed = []; for (const activity of app.activity ?? []) { if (activity.$?.['android:enableOnBackInvokedCallback'] !== undefined) { removed.push(activity.$['android:name']); delete activity.$['android:enableOnBackInvokedCallback']; } } return { androidManifest, removed };}module.exports = function withBackInvokedActivityCleanup(config) { return withAndroidManifest(config, (config) => { const { androidManifest, removed } = removeActivityBackInvokedFlags(config.modResults); if (removed.length) console.log(`[back-invoked] removed activity-level flag: ${removed.join(', ')}`); config.modResults = androidManifest; return config; });};module.exports.removeActivityBackInvokedFlags = removeActivityBackInvokedFlags;
In app.json, put Expo's setting and the plugin side by side. predictiveBackGestureEnabled defaults to false, so omitting it gives the same result, but I keep it explicit to record the intent.
The rewrite lives in its own exported function so it can be tested without @expo/config-plugins. Building the manifest's JSON form by hand and calling it gives:
const manifest = { manifest: { application: [{ $: { 'android:name': '.MainApplication', 'android:enableOnBackInvokedCallback': 'false' }, activity: [{ $: { 'android:name': '.MainActivity', 'android:enableOnBackInvokedCallback': 'true' } }],}] } };removeActivityBackInvokedFlags(manifest);// removed : [".MainActivity"]// application: {"android:name":".MainApplication","android:enableOnBackInvokedCallback":"false"}// activity : {"android:name":".MainActivity"}// prebuild runs many times, so also confirm a second run removes nothingremoveActivityBackInvokedFlags(manifest);// removed : []
The output shows the <application> value is never touched. When you are ready for real support, you flip predictiveBackGestureEnabled to true and leave the plugin in place. Having it as a plugin also means the repository history records when and why it went in, which my future self tends to appreciate.
Common misunderstandings
"Even in Expo, I have to write the opt-out into the manifest myself." No. Since SDK 54, false is written by default (app config reference). Writing it yourself just gives you two sources of truth.
"Opting out also stops AndroidX back handling." No. Android's own guide states that OnBackPressedCallback is always called regardless of the flag. What stops is the system animation and OnBackInvokedCallback.
"Expo turned the default on in SDK 55 or 56." The plan was mentioned in the SDK 54 notes, but the SDK 58 reference as of November 2026 still says false. Check the reference for the version you are upgrading to.
On a device, only check the places that own back
For apps flagged REVIEW, I check three places — all of them spots where my code takes over back:
Returning from a full-screen preview to the grid. If this exits the app, it feels like the biggest break.
Modals and bottom sheets. Does back close the sheet, or the whole screen? With several components owning visibility, this is where they fight.
An exit confirmation on the root screen. If you return true from hardwareBackPress to show a dialog, make sure that branch still runs.
I run these in a development build, not Expo Go, since Expo Go does not apply your app.json Android settings. I also switch the device between three-button and gesture navigation, because the two behave differently.
The opt-out is not permanent. Both Google and Expo write as if a future Android may remove it. When you move toward real support, the first wall is whether your navigation foundation supports predictive back at all.
In SDK 56, Expo started shipping an experimental new native stack (Stack v5) built with react-native-screens, including initial predictive back support. Because it is still experimental, I keep the opt-out in production and only try predictiveBackGestureEnabled: true with the new stack on a separate test branch.
The one thing I would do today is grep two lines — predictiveBackGestureEnabled in app.json, and, if you have an android/ directory, enableOnBackInvokedCallback in the manifest.
If neither shows true, and no <activity> line carries the attribute, that app still has its old back behavior. Real predictive back support can wait until your navigation foundation is ready for it.
Share
Thank You for Reading
Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.