From 4b7aaa0777b7dee4f53d13c10e03c0de2c597026 Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Tue, 10 Nov 2026 23:22:11 +0100 Subject: [PATCH 1/2] docs(replay): Document pausing touch tracking on Android and Apple Add a section on pauseTouchTracking() and resumeTouchTracking(), which stop recording touches on sensitive screens while the masked screen recording continues. Co-Authored-By: Claude Opus 5.5 --- .../android/session-replay/index.mdx | 20 ++++++++++++++ .../apple/common/session-replay/index.mdx | 27 +++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/docs/platforms/android/session-replay/index.mdx b/docs/platforms/android/session-replay/index.mdx index 94c5bcc83212d..abeff01cf8ec3 100644 --- a/docs/platforms/android/session-replay/index.mdx +++ b/docs/platforms/android/session-replay/index.mdx @@ -207,6 +207,26 @@ The SDK can't determine whether foregrounding returns to the same sensitive scre - If a deep link opens a non-sensitive product screen, call `resume()` from that destination after the sensitive content is no longer visible. - If a notification or normal navigation opens another non-sensitive screen, call `resume()` from the new screen instead of from the sensitive screen's exit callback. +### Pause Touch Tracking on Sensitive Screens + +Starting with version 8.64.0, the SDK can stop recording touches while it continues to record the screen. Use this on screens where masking hides the content, but the touch positions could reveal the input, such as a custom PIN pad or a masked `WebView`. + +Call `pauseTouchTracking()` before showing the sensitive content and `resumeTouchTracking()` after the content is hidden. Touch tracking stays paused for all replays in the same app process, including new replays and replays restarted with `stop()` and `start()`, until you call `resumeTouchTracking()`. Calling `resume()` doesn't resume touch tracking, and `resumeTouchTracking()` doesn't record touches while the replay is paused with `pause()`. You can call `pauseTouchTracking()` before a replay starts. Breadcrumbs aren't affected; use [`beforeBreadcrumb`](/platforms/android/enriching-events/breadcrumbs/#customize-breadcrumbs) to filter them. + +```kotlin {tabTitle:Kotlin} +Sentry.replay().pauseTouchTracking() + +// Record touches again after leaving the sensitive screen. +Sentry.replay().resumeTouchTracking() +``` + +```java {tabTitle:Java} +Sentry.replay().pauseTouchTracking(); + +// Record touches again after leaving the sensitive screen. +Sentry.replay().resumeTouchTracking(); +``` + ### Stop or Flush Recording Call `stop()` to end the current replay. In session mode, the SDK sends any pending segment before stopping. In buffer mode, it discards the unsent buffer. A later call to `start()` or `startBuffering()` creates a new replay session. diff --git a/docs/platforms/apple/common/session-replay/index.mdx b/docs/platforms/apple/common/session-replay/index.mdx index 6eadd02a4ea4e..810defc204550 100644 --- a/docs/platforms/apple/common/session-replay/index.mdx +++ b/docs/platforms/apple/common/session-replay/index.mdx @@ -144,6 +144,33 @@ SentrySDK.replay.resume() [SentryObjCSDK.replay resume]; ``` +### Pause Touch Tracking on Sensitive Screens + +Starting with version 9.34.0, the SDK can stop recording touches while it continues to record the screen. Use this on screens where masking hides the content, but the touch positions could reveal the input, such as a custom PIN pad or a masked `WKWebView`. + +Call `pauseTouchTracking()` before showing the sensitive content and `resumeTouchTracking()` after the content is hidden. Touch tracking stays paused for all replays in the same app process, including new replays and replays restarted with `stop()` and `start()`, until you call `resumeTouchTracking()`. Calling `resume()` doesn't resume touch tracking, and `resumeTouchTracking()` doesn't record touches while the replay is paused with `pause()`. You can call `pauseTouchTracking()` before a replay starts. Breadcrumbs aren't affected; use [`beforeBreadcrumb`](/platforms/apple/enriching-events/breadcrumbs/#customize-breadcrumbs) to filter them. + +```swift {tabTitle:Swift} {mdExpandTabs} +SentrySDK.replay.pauseTouchTracking() + +// Record touches again after leaving the sensitive screen. +SentrySDK.replay.resumeTouchTracking() +``` + +```objc {tabTitle:Objective-C} +[SentrySDK.replay pauseTouchTracking]; + +// Record touches again after leaving the sensitive screen. +[SentrySDK.replay resumeTouchTracking]; +``` + +```objc {tabTitle:Objective-C (SentryObjC)} +[SentryObjCSDK.replay pauseTouchTracking]; + +// Record touches again after leaving the sensitive screen. +[SentryObjCSDK.replay resumeTouchTracking]; +``` + ### Stop or Flush Recording Call `stop()` to end the current replay. A later call to `start()` or `startBuffering()` creates a new replay instead of resuming the stopped one. From 8411f09ecacec8b0701054f4212f2d227a5f2bdb Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Fri, 13 Nov 2026 12:49:21 +0100 Subject: [PATCH 2/2] docs(replay): Document pausing touch tracking on React Native and Flutter Add the section for the React Native and Flutter Session Replay pages, and move the Android and Apple versions to 8.65.0 and 9.35.0, because 8.64.0 and 9.34.0 were released without the feature. Co-Authored-By: Claude Opus 5.5 --- .../android/session-replay/index.mdx | 2 +- .../apple/common/session-replay/index.mdx | 2 +- .../guides/flutter/session-replay/index.mdx | 17 +++++++++++++++++ .../common/session-replay/index.mdx | 19 +++++++++++++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/docs/platforms/android/session-replay/index.mdx b/docs/platforms/android/session-replay/index.mdx index abeff01cf8ec3..1b4d414156cba 100644 --- a/docs/platforms/android/session-replay/index.mdx +++ b/docs/platforms/android/session-replay/index.mdx @@ -209,7 +209,7 @@ The SDK can't determine whether foregrounding returns to the same sensitive scre ### Pause Touch Tracking on Sensitive Screens -Starting with version 8.64.0, the SDK can stop recording touches while it continues to record the screen. Use this on screens where masking hides the content, but the touch positions could reveal the input, such as a custom PIN pad or a masked `WebView`. +Starting with version 8.65.0, the SDK can stop recording touches while it continues to record the screen. Use this on screens where masking hides the content, but the touch positions could reveal the input, such as a custom PIN pad or a masked `WebView`. Call `pauseTouchTracking()` before showing the sensitive content and `resumeTouchTracking()` after the content is hidden. Touch tracking stays paused for all replays in the same app process, including new replays and replays restarted with `stop()` and `start()`, until you call `resumeTouchTracking()`. Calling `resume()` doesn't resume touch tracking, and `resumeTouchTracking()` doesn't record touches while the replay is paused with `pause()`. You can call `pauseTouchTracking()` before a replay starts. Breadcrumbs aren't affected; use [`beforeBreadcrumb`](/platforms/android/enriching-events/breadcrumbs/#customize-breadcrumbs) to filter them. diff --git a/docs/platforms/apple/common/session-replay/index.mdx b/docs/platforms/apple/common/session-replay/index.mdx index 810defc204550..19b12def84b58 100644 --- a/docs/platforms/apple/common/session-replay/index.mdx +++ b/docs/platforms/apple/common/session-replay/index.mdx @@ -146,7 +146,7 @@ SentrySDK.replay.resume() ### Pause Touch Tracking on Sensitive Screens -Starting with version 9.34.0, the SDK can stop recording touches while it continues to record the screen. Use this on screens where masking hides the content, but the touch positions could reveal the input, such as a custom PIN pad or a masked `WKWebView`. +Starting with version 9.35.0, the SDK can stop recording touches while it continues to record the screen. Use this on screens where masking hides the content, but the touch positions could reveal the input, such as a custom PIN pad or a masked `WKWebView`. Call `pauseTouchTracking()` before showing the sensitive content and `resumeTouchTracking()` after the content is hidden. Touch tracking stays paused for all replays in the same app process, including new replays and replays restarted with `stop()` and `start()`, until you call `resumeTouchTracking()`. Calling `resume()` doesn't resume touch tracking, and `resumeTouchTracking()` doesn't record touches while the replay is paused with `pause()`. You can call `pauseTouchTracking()` before a replay starts. Breadcrumbs aren't affected; use [`beforeBreadcrumb`](/platforms/apple/enriching-events/breadcrumbs/#customize-breadcrumbs) to filter them. diff --git a/docs/platforms/dart/guides/flutter/session-replay/index.mdx b/docs/platforms/dart/guides/flutter/session-replay/index.mdx index e801ea17494c6..3345127676d21 100644 --- a/docs/platforms/dart/guides/flutter/session-replay/index.mdx +++ b/docs/platforms/dart/guides/flutter/session-replay/index.mdx @@ -166,6 +166,23 @@ try { Here, `showSensitiveScreen()` represents your app's navigation flow and should complete after the sensitive screen closes. Continue to configure masking rules for recorded content. Pausing Replay does not disable other SDK features, such as error reporting. +### Pause Touch Tracking Around Sensitive Content + +Starting with version 10.5.0, the SDK can stop recording touches while it continues to record the screen. Use this on screens where masking hides the content, but the touch positions could reveal the input, such as a custom PIN pad or a masked `WebView`. + +Call `pauseTouchTracking()` before showing the sensitive content and `resumeTouchTracking()` after hiding it. Touch tracking stays paused for all replays in the same app process, including new replays and replays restarted with `stop()` and `start()`, until you call `resumeTouchTracking()`. Calling `resume()` doesn't resume touch tracking, and `resumeTouchTracking()` doesn't record touches while the replay is paused with `pause()`. You can call `pauseTouchTracking()` before a replay starts. Breadcrumbs aren't affected; use [`beforeBreadcrumb`](/platforms/dart/guides/flutter/enriching-events/breadcrumbs/#customize-breadcrumbs) to filter them. + +```dart +await SentryFlutter.replay.pauseTouchTracking(); +try { + await showSensitiveScreen(); +} finally { + await SentryFlutter.replay.resumeTouchTracking(); +} +``` + +`pauseTouchTracking()` and `resumeTouchTracking()` are supported on iOS and Android only. On other platforms, including Web, they do nothing. + ### End or Send a Replay Call `stop()` to end the current replay. Starting again creates a new replay with a new replay ID: diff --git a/docs/platforms/react-native/common/session-replay/index.mdx b/docs/platforms/react-native/common/session-replay/index.mdx index 56a58f46f105d..ede4085c64590 100644 --- a/docs/platforms/react-native/common/session-replay/index.mdx +++ b/docs/platforms/react-native/common/session-replay/index.mdx @@ -167,6 +167,25 @@ Sentry.getReplay()?.resume(); +### Pause Touch Tracking on Sensitive Screens + +Starting with version 8.36.0, the SDK can stop recording touches while it continues to record the screen. Use this on screens where masking hides the content, but the touch positions could reveal the input, such as a custom PIN pad or a masked `WebView`. + +Call `pauseTouchTracking()` before showing the sensitive content and `resumeTouchTracking()` after the content is hidden. Touch tracking stays paused for all replays in the same app process, including new replays and replays restarted with `stop()` and `start()`, until you call `resumeTouchTracking()`. Calling `resume()` doesn't resume touch tracking, and `resumeTouchTracking()` doesn't record touches while the replay is paused with `pause()`. You can call `pauseTouchTracking()` before a replay starts. Breadcrumbs aren't affected; use [`beforeBreadcrumb`](/platforms/react-native/enriching-events/breadcrumbs/#customize-breadcrumbs) to filter them. + +```javascript +Sentry.getReplay()?.pauseTouchTracking(); + +// Record touches again after leaving the sensitive screen. +Sentry.getReplay()?.resumeTouchTracking(); +``` + + + +`pauseTouchTracking()` and `resumeTouchTracking()` are supported on iOS and Android only. On React Native Web they are no-ops (a debug message is logged). + + + ### Stop or Flush Recording Call `stop()` to end the current replay. In session mode, the SDK sends any pending segment before stopping. In buffer mode, it discards the unsent buffer. A later call to `start()` or `startBuffering()` creates a new replay session.