You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f69512e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(android): Part 3 of Nav3 support for multi-Activity and multi-Fragment apps (JAVA-785, JAVA-823) (#6480)
This commit constitutes part 3 of our Nav3 support for multi-Activity and multi-Fragment apps.
In part 1 (#6301) we provided the basic mechanism for coordinating multiple SentryNavEffects; and in part 2 (#6398) we adapted our approach to the quirks of ViewPager2 and other oddball Fragment lifecycles.
Both of those commits assumed that any Activities or Fragments that had a SentryNavEffect would only launch other Activities or Fragments that also had SentryNavEffects. This commit handles three remaining (and important) corner cases:
1. Ensuring spans don't get lost when the user returns to an Activity or Fragment they already visited. (We now start a new nav transaction when the user returns if the previous transaction finished in the meantime.)
2. Ensuring Activities or Fragments with SentryNavEffects play nicely with Activities or Fragments without them. (We no longer keep stale nav data in the shared IScope.)
3. Ensuring Activities' ui.load transactions interoperate well with Nav3 transactions. (Nav3 transactions now consistently defer to ui.load transactions, like we do for Nav2.)
See the PR description of #6480 for more details.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,14 @@
15
15
16
16
- Most SDK log calls no longer allocate when `debug` is off ([#6600](https://github.com/getsentry/sentry-java/pull/6600))
17
17
18
+
### Behavioral Changes
19
+
20
+
- Nav3: Returning to an Activity or Fragment with its own `SentryNavEffect` within the app (e.g., closing the Activity that covered it, swiping back to its ViewPager2 page, or dismissing a dialog over it) now starts a new navigation transaction for the current destination if the previous one finished, so spans produced upon return can now be consistently captured ([#6482](https://github.com/getsentry/sentry-java/pull/6482))
21
+
- Nav3: `ui.load` transactions are bound to `IScope` in preference to Nav3 transactions when transitioning between Activities, matching Nav2 behavior (API 29+) ([#6484](https://github.com/getsentry/sentry-java/pull/6484))
22
+
18
23
### Fixes
19
24
25
+
- Nav3: Stop attributing errors and spans from an Activity or ViewPager2 page without a `SentryNavEffect` to the most recently visited Nav3 root ([#6483](https://github.com/getsentry/sentry-java/pull/6483))
20
26
- Android: Count deep sleep in breadcrumb, screenshot and view hierarchy debounce windows, so the first low-memory or battery breadcrumb after a long Doze is no longer dropped ([#6590](https://github.com/getsentry/sentry-java/pull/6590))
0 commit comments