GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(android/application): open windows after the original activity finishes by rafaelaugustos · Pull Request #11552 · NativeScript/NativeScript

Conversation

@rafaelaugustos

@rafaelaugustos rafaelaugustos commented Oct 19, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR Checklist

  • The PR title follows the commit guidelines.
  • There is an issue for the bug: Android openWindow uses an undeclared Activity class after the original Activity finishes #11526.
  • You have signed the CLA.
  • All existing Core unit tests pass (544 passed, 1 skipped).
  • Tests for the changes are included.

What is the current behavior?

After the original Android Activity finishes, startActivity can be cleared while a secondary NativeWindow remains usable. openWindow() then targets the hard-coded org.nativescript.NativeScriptActivity, which may not be declared in the manifest, and throws ActivityNotFoundException.

What is the new behavior?

Resolve the target from a live NativeScript Activity: the original Activity, the foreground Activity, or an attached surviving window. Exclude finishing/destroyed Activities, windows whose native surfaces are gone, and SDK Activities without the NativeScript marker. If none remains, use the application's configured launch component; report a clear error when it has no launch component instead of starting an undeclared class.

The existing window flags and payload delivery are preserved. This changes Android target selection only; there is no public API change.

Closes #11526.

Validation

  • Added 10 regression cases for surviving windows, original/foreground Activity selection, SDK Activities, finishing/destroyed Activities, detached surfaces, configured launch components and the missing-launcher error. Against the original implementation, 9 of these cases fail.
  • npx nx run core:test: 544 passed, 1 skipped, across 42 test files.
  • npx nx run core:build: passed, before and after the fix.
  • npx nx format:write --files=packages/core/application/application.android.ts,packages/core/application/open-window.android.spec.ts,packages/core/vitest.setup.ts: passed.
  • Android 16 / API 36 arm64 emulator, NativeScript Android runtime 9.1.1, Core built from 3224f1b, com.tns.NativeScriptActivity, launchMode="standard": reproduced using an isolated native app with a window content resolver, without the router.

The native app opens a second window, finishes the original Activity, then requests another window from the survivor after activityDestroyed:

Before the final open request (both builds):
  startActivity=false, foregroundActivity=true, windows=1

Original Core:
  ActivityNotFoundException:
  {org.nativescript.openwindow11526/org.nativescript.NativeScriptActivity}

Patched Core:
  {"ok":true,"windows":2,"originalDestroyed":true,
   "payload":"after-primary-finished","flags":403177472}

The complete native automated app suite and an iOS simulator run were not executed locally. The native before/after check above and the full Core unit suite were executed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rafaelaugustos
fix(android/application): resolve openWindow targets from surviving a…
ad2e1e0
…ctivities
This was referenced Oct 21, 2026
Scope navigation to NativeWindow (experimental) rafaelaugustos/vue-router-ns#65
Merged
Scope router stacks and navigation lifecycle to NativeWindow rafaelaugustos/vue-router-ns#46
Closed
fix(ios): preserve lazy controller loading during layout invalidation #11587
Open
@rafaelaugustos
Merge branch 'main' into fix/android-open-window-activity
bac68f9
@nx-cloud

nx-cloud Bot commented Oct 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit c7d321d

Command Status Duration Result
nx run-many -t build -p core,webpack5,vite ✅ Succeeded 16s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-11-12 02:13:23 UTC

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pkg-pr-new

pkg-pr-new Bot commented Oct 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nativescript/core@11552
npm i https://pkg.pr.new/@nativescript/vite@11552
npm i https://pkg.pr.new/@nativescript/webpack@11552

commit: c7d321d

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rafaelaugustos rafaelaugustos mentioned this pull request Oct 26, 2026
fix(ios): preserve native content Back for default Frame navigation #11590
Open
5 tasks done
rafaelaugustos added 2 commits October 31, 2026 09:06
@rafaelaugustos
Merge branch 'main' into fix/android-open-window-activity
567eb4a
@rafaelaugustos
Merge branch 'main' into fix/android-open-window-activity
c7d321d

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Android openWindow uses an undeclared Activity class after the original Activity finishes

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@rafaelaugustos
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.