diff --git a/contents/docs/session-replay/_snippets/android-installation.mdx b/contents/docs/session-replay/_snippets/android-installation.mdx index d78b0a19f674..7c3ff0531368 100644 --- a/contents/docs/session-replay/_snippets/android-installation.mdx +++ b/contents/docs/session-replay/_snippets/android-installation.mdx @@ -19,12 +19,10 @@ val config = PostHogAndroidConfig(apiKey = "").apply { sessionReplay = true // Whether text inputs are masked. Default is true. - // This isn't supported for Jetpack Compose views. // Password inputs are always masked regardless sessionReplayConfig.maskAllTextInputs = true // Whether images are masked. Default is true. - // This isn't supported for Jetpack Compose views. sessionReplayConfig.maskAllImages = true // Capture logs automatically. Default is true. @@ -45,7 +43,6 @@ val config = PostHogAndroidConfig(apiKey = "").apply { - Requires Android API >= 26. - Jetpack Compose is only supported if `screenshotMode` is enabled. - - Masking and redacting in Jetpack Compose isn't supported yet. We're investigating this [issue](https://github.com/PostHog/posthog-android/issues/158). - Custom views are partly supported, and only fully supported if `screenshotMode` is enabled. - WebView is not supported. A placeholder will be shown. - Keyboard is not supported. A placeholder will be shown. diff --git a/contents/docs/session-replay/_snippets/android-privacy.mdx b/contents/docs/session-replay/_snippets/android-privacy.mdx index 6bc3a4cd1ae1..8c2bd6ba0a2b 100644 --- a/contents/docs/session-replay/_snippets/android-privacy.mdx +++ b/contents/docs/session-replay/_snippets/android-privacy.mdx @@ -1,5 +1,3 @@ -> 🚧 **NOTE:** Currently, this isn't supported if using Jetpack Compose views. We're investigating this [issue](https://github.com/PostHog/posthog-android/issues/158). - To replace any type of `View` with a redacted version in the recording, set the [tag](https://developer.android.com/reference/android/view/View#tags) to `ph-no-capture`. ```xml @@ -9,4 +7,23 @@ To replace any type of `View` with a redacted version in the recording, set the android:layout_height="200dp" android:tag="ph-no-capture" /> -``` \ No newline at end of file +``` + +### Masking in Jetpack Compose + +- You can manually mark a Compose View for masking using the `postHogMask()` view modifier: + +```android_kotlin +... + Text( + text = AnnotatedString(text), + modifier = + modifier + .wrapContentSize() + .postHogMask() + .clickable { + text = "Clicked!" + }, + ) +... +```