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 — feat(android): prototype Frame-owned interactive back previews by rafaelaugustos · Pull Request #11558 · NativeScript/NativeScript

Conversation

@rafaelaugustos

@rafaelaugustos rafaelaugustos commented Oct 20, 2026

Copy link
Copy Markdown

PR Checklist

  • Conventional PR title.
  • Proposal tracked in Proposal: Frame-owned Android interactive back previews without changing native history #11557; public API is experimental and offered for review.
  • CLA signed.
  • Core unit tests pass: 540 passed, one existing skip; Core build passes.
  • Tests included: unit session lifetime tests, native Frame ownership/recreation tests and a standalone toolbox example.

What is the current behavior?

Frame exposes final Back but no presentation-only interactive preview. External routers currently reparent a retained Page during Android back progress. Frame's logical history is separate from FragmentManager's back stack, so enabling FragmentManager predictive pop is not a compatible one-line change.

Native acceptance also exposed a pre-existing recreation failure: the new root view can attach while its owning Activity is INITIALIZED. Frame ignores that attach, never marks itself attached after CREATED, and subsequent navigation remains queued. A plain NativeScript reproduction fails with published Core 9.1.3 on API 35.

What is the new behavior?

Experimental Frame.beginBackPreview() creates a version-1 snapshot session on Android 14+. Progress/cancel/finish only change presentation; the caller retains gesture dispatch, guards and the final navigation decision. Frame automatically disposes the session when navigation, unload, detach or native disposal takes over. iOS returns undefined.

The previous Page is software-drawn into a bounded, accessibility-hidden Android ImageView and stays detached/unloaded. Secure windows, SurfaceView/TextureView content, custom/shared transitions, unavailable geometry and failed capture decline the session. This is intentionally opt-in: capture costs time and memory, previews are static, and no performance improvement or universal content compatibility is claimed.

The first commit independently fixes early attachment by using the owning Activity and rechecking an already-attached native view when the Frame loads. It is separable from the prototype.

Implements the prototype proposed in #11557. Related consumer investigation: rafaelaugustos/vue-router-ns#62.

Native validation

Candidate built from upstream main 3224f1b, with stock Android runtime 9.1.1 / native Core resources; the demo aliases this compiled Core rather than modifying installed packages. API 34/35/36 ARM64 emulators passed:

  • Real Android system gestures for cancellation and completion; previous Page remains detached in the candidate, and FragmentManager back-stack count remains zero.
  • Global guard refusal, active leave-guard suppression, custom-transition fallback, modal inner Back/results, replace/clearHistory, and interruption by a new navigation.
  • Eight repeated snapshot cycles; all tracked Android Bitmaps collected through native WeakReference/ReferenceQueue after three fixed JS/native GC rounds.
  • Actual same-process Activity.recreate() with both legacy and candidate previews: old session disposed, Page identities/draft retained, and Back works after recreation. The unmodified published Core negative control reproduces the queued-Back failure on API 35.

The router fixture records lifecycle traces, capture allocation/time, screenshots during native input, and process/Activity identities. The full automated Core device app was not run as a whole; the standalone native reproduction exercised the added regression behavior directly. Physical-device performance, arbitrary vendor SDK rendering, and TalkBack speech are not claimed.

See tools/notes/FrameBackPreview.md for the API, native example and limitations. The consumer continues shipping its existing preview by default.

Sorry, something went wrong.

Uh oh!

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

All reactions
rafaelaugustos added 2 commits October 20, 2026 17:56
@rafaelaugustos
fix(android): resume Frame navigation after early Activity attachment
b27f2eb
@rafaelaugustos
feat(android): prototype Frame-owned interactive back previews
fadb58f
This was referenced Oct 20, 2026
feat(android): prototype optional Core-owned back previews rafaelaugustos/vue-router-ns#108
Merged
Prototype core-owned Android predictive-back transitions and upstream integration rafaelaugustos/vue-router-ns#62
Closed
Specify optional native-host transition observation and lifecycle capabilities rafaelaugustos/vue-router-ns#145
Closed
fix(ios): preserve lazy controller loading during layout invalidation #11587
Open
@rafaelaugustos
Merge branch 'main' into feat/android-frame-back-preview
00f367f
@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 064eb30

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 3m 46s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded 10s View ↗

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


☁️ Nx Cloud last updated this comment at 2026-10-31 12:13:32 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@11558
npm i https://pkg.pr.new/@nativescript/vite@11558
npm i https://pkg.pr.new/@nativescript/webpack@11558

commit: 064eb30

All reactions

Sorry, something went wrong.

Uh oh!

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

@rafaelaugustos
Merge branch 'main' into feat/android-frame-back-preview
064eb30

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.

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.