Title: Android openWindow uses an undeclared Activity class after the original Activity finishes · Issue #11526 · NativeScript/NativeScript · GitHub
Open Graph Title: Android openWindow uses an undeclared Activity class after the original Activity finishes · Issue #11526 · NativeScript/NativeScript
X Title: Android openWindow uses an undeclared Activity class after the original Activity finishes · Issue #11526 · NativeScript/NativeScript
Description: ⚡ Write Native with TypeScript ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java, Dart). Use what you love ❤️ Angular, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android (View, Jetpack Compose), Flutter and you name it compatible. - Android openWindow uses an undeclared Activity class after the original Activity finishes · Issue #11526 · NativeScript/NativeScript
Open Graph Description: ⚡ Write Native with TypeScript ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java, Dart). Use what you love ❤️ Angular, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android...
X Description: ⚡ Write Native with TypeScript ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java, Dart). Use what you love ❤️ Angular, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android...
Opengraph URL: https://github.com/NativeScript/NativeScript
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Android openWindow uses an undeclared Activity class after the original Activity finishes","articleBody":"### Observed behavior\n\nOn Android, `Application.openWindow()` can throw `ActivityNotFoundException` after the original/primary Activity has finished, even while another NativeWindow from the app remains open.\n\nObserved with NativeScript core/runtime 9.1.1 on an Android 15/API 35 arm64 emulator, using `com.tns.NativeScriptActivity` and `launchMode=\"standard\"`. The remaining secondary window could still navigate, but requesting another window attempted to launch `org.nativescript.NativeScriptActivity`, which was not declared in the manifest.\n\n### Reproduction\n\n1. Configure a multi-instance launch Activity and a window content resolver.\n2. Launch the primary window and open a secondary one with `Application.openWindow()`.\n3. Finish the original Activity while leaving the secondary window alive.\n4. From the remaining window, call `Application.openWindow()` again.\n\nObserved exception:\n\n```text\nandroid.content.ActivityNotFoundException: Unable to find explicit activity class\n{org.nativescript.vuerouterns/org.nativescript.NativeScriptActivity};\nhave you declared this activity in your AndroidManifest.xml ...?\n```\n\n### Expected behavior\n\nUse a valid NativeScript Activity class from a surviving owned window (or the application's configured launch component) when the initial Activity no longer exists. Closing one document window should not prevent another from opening further windows.\n\n### Suspected cause\n\n`AndroidApplication.openWindow()` uses `this.startActivity` to select the target class. If it is absent, it falls back to a hard-coded class name. Activity destruction can clear `startActivity`, even though a secondary NativeWindow still has an Activity.\n\nA possible direction is to consult the surviving primary/owned NativeWindow's Activity before using a class-name fallback; the policy should avoid accidentally reopening an unrelated SDK Activity that happens to be foreground.\n\nSource: https://github.com/NativeScript/NativeScript/blob/main/packages/core/application/application.android.ts\n\nFound while validating multi-window routing in https://github.com/rafaelaugustos/vue-router-ns/issues/46. This report concerns the native `openWindow` request itself, independently of route matching.\n","author":{"url":"https://github.com/rafaelaugustos","@type":"Person","name":"rafaelaugustos"},"datePublished":"2026-10-15T03:19:40Z","url":"https://github.com/NativeScript/NativeScript/issues/11526"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:6a43a45e-3e8e-f893-d0ba-5b49bdbc6045 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B0CE:1CEA6F:17E9678:1F81511:6B0136C1 |
| html-safe-nonce | 7ed7d12638a477f4f0c93c722efbdf4f351a1f523250c74261d03015be8170d8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMENFOjFDRUE2RjoxN0U5Njc4OjFGODE1MTE6NkIwMTM2QzEiLCJ2aXNpdG9yX2lkIjoiOTE4OTQ4MTQ1NjczOTYyODczNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e03bfe0481b8e3f978b194250b66906909ba4e4ff12bdda350fc27d218cd32fd |
| hovercard-subject-tag | repository:31492490 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/NativeScript/NativeScript/issues/11526 |
| twitter:image | https://repository-images.githubusercontent.com/31492490/ae47392a-915f-4a6a-8f3b-7062e556d918 |
| twitter:card | summary_large_image |
| og:image | https://repository-images.githubusercontent.com/31492490/ae47392a-915f-4a6a-8f3b-7062e556d918 |
| og:image:alt | ⚡ Write Native with TypeScript ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java, Dart). Use what you love ❤️ Angular, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-cache |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width