← 输入框|github.com|刷新
Skip to content

fix(core): fire launch again for the first window after exit - #11573

Open
anjak03 wants to merge 1 commit into
NativeScript:mainfrom
anjak03:fix/android-launch-after-exit
Open

anjak03 wants to merge 1 commit into
NativeScript:mainfrom
anjak03:fix/android-launch-after-exit

Conversation

@anjak03

@anjak03 anjak03 commented Oct 23, 2026 •

Copy link
Copy Markdown

PR Checklist

What is the current behavior?

The legacy launch event fires only for the first window of the process, because _launchBridgeConsumed is set once and never reset. On Android 10 and 11, Back on the root activity finishes it and exit fires, but the process stays alive. When the user reopens the app, the new activity doesn't fire launch again. @nativescript/angular bootstraps only in its launch handler and tears the app down on exit, so the app stays unstyled and unresponsive until the process is killed. This worked in 9.0.x, where every new activity without saved state fired launch.

What is the new behavior?

ApplicationCommon re-arms the launch bridge when exit fires, so the first window after an exit fires launch again. Windows opened while the app is running still don't fire it, so multi-window behaviour is unchanged.

Added a unit test in window-content-resolver.spec.ts that fails without the fix. Also verified on a physical Android 11 device with an Angular app built against this branch: leaving with Back and reopening now bootstraps the app again.

Fixes #11572.

@anjak03
anjak03 force-pushed the fix/android-launch-after-exit branch from 6df8b40 to a6554e5 Compare October 26, 2026 18:01

This branch has not been deployed

No deployments
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.

[Android] After exiting with Back, reopening the app in the same process never fires launch again (9.1 regression, Angular apps stay dead and unstyled)

2 participants