Skip to main content
Version: 1.1.x

Privacy Masking - XML Views

Mark sensitive Views on their owning UI thread, before exposing sensitive content. A marked View is masked in UI captures and excluded from automatic Screen Text collection.

import ai.coryn.replay.api.core.main.Coryn
import ai.coryn.replay.shared.uicapture.CorynPadding

Coryn.hideFromUiCapture(binding.creditCardNumber)
Coryn.hideFromUiCapture(
view = binding.address,
padding = CorynPadding.horizontal(16f)
)

hide defaults to true, and padding defaults to null. To reveal a previously hidden View:

Coryn.hideFromUiCapture(view = binding.creditCardNumber, hide = false)
// Alternatively:
binding.creditCardNumber.corynHideFromUiCapture(hide = false)
Attachment, recycling and repeated declarations

You can mark a View before attaching it to a window. Masking also supports recycled RecyclerView rows. When rebinding a row, set its hiding flag and padding before displaying sensitive content.

For shared behavior, see padding, moving hidden content, overscroll strategies and secure windows. Normal scrolling and layout movement do not require manual notifications; only the exceptional manual position changes described there do.

Views inside Composables

For a View hosted in an AndroidView, use Modifier.corynHideFromUiCapture() on the Composable. Masking the hosted View directly is not supported.