Native AAB: back gesture should exit to launcher when WebView history is empty

In Base44-generated Android AABs, the system back gesture (edge-swipe or hardware button) on the app's root URL does not exit to launcher — it stays in-app. The same React codebase in an installed PWA (standalone mode) exits correctly.

Expected behavior: When WebView.canGoBack() returns false, the shell should fall through to super.onBackPressed() (or the OnBackInvokedCallback equivalent on Android 13+), so the OS handles the gesture as "exit activity".

Why this matters:

  • Standard Android UX expectation — an app that traps users on the root screen feels broken.

  • Affects every Base44-published Android app, not specific to one project.

  • Important for proper predictive-back support on Android 13+ (Play Store quality guidelines).

Implementation hint: Typically requires (a) a standard onBackPressed override that falls through to super, and (b) opting into OnBackInvokedCallback in the manifest for Android 13+ predictive back.

Note: I've already audited my JS to ensure the WebView history is clean on root (no stray pushState entries, all redirect navigations use replace), so the canGoBack signal is reliable on our side.

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
💡

Feature Request

Date

1 day ago

Author

Moshe Sherf

Subscribe to post

Get notified by email when there are changes.