Skip to content

fix(sample): Apply Nav3 sample options when a child Activity is restored - #6485

Open
0xadam-brown wants to merge 1 commit into
mainfrom
fix/nav3-sample-restore-options
Open

0xadam-brown wants to merge 1 commit into
mainfrom
fix/nav3-sample-restore-options

Conversation

@0xadam-brown

Copy link
Copy Markdown
Member

📜 Description

Nav3ProductsActivity, Nav3CheckoutActivity (which also covers Nav3TranslucentCheckoutActivity), and Nav3FragmentsActivity now apply the sample's configuration to the live SDK options in onCreate.

💡 Motivation and Context

Only Nav3Activity applied the sample's settings (screen tracking, user-interaction transactions and breadcrumbs) to the SDK options. The child Activities read the same configuration from their intent extras but never applied it. When Android restores the process straight into a child Activity, Nav3Activity isn't recreated, so the options stayed at the app's init defaults. Those defaults have user-interaction tracing on, so taps created ui.action.click transactions even with the toggle off.

Sample only. Split out of the Nav3 Lifecycle stack (#6480).

💚 How did you test it?

On an API 28 emulator, I turned user-interaction tracing off, opened Nav3ProductsActivity, killed the process with am kill, and restored the task. With this change, a tap made no ui.action.click transaction. Without it, it made one. That test ran on the original Nav3 Lifecycle branch, from which this change is copied unchanged. The sample compiles on top of main.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

None.

#skip-changelog

Only Nav3Activity applied the sample's settings (screen tracking, user-interaction transactions and breadcrumbs) to the SDK options. When Android restored the process straight into Nav3ProductsActivity, Nav3CheckoutActivity, or Nav3FragmentsActivity, the options stayed at the app's init defaults, which have user-interaction tracing on. Each of those Activities now applies the configuration from its intent extras in onCreate.
@sentry

sentry Bot commented Nov 6, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.63.0 (1) release

⚙️ sentry-android Build Distribution Settings

@0xadam-brown
0xadam-brown marked this pull request as ready for review November 6, 2026 09:55
@0xadam-brown
0xadam-brown requested review from a team and adinauer as code owners November 6, 2026 09:55
@0xadam-brown
0xadam-brown requested review from romtsn and runningcode and removed request for a team November 6, 2026 09:55
@0xadam-brown 0xadam-brown added the ship-it PR is ready to merge from a reviewer perspective label Nov 6, 2026

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

ship-it PR is ready to merge from a reviewer perspective

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant