Sensitive Data Occlusion and Screen Blurring

API reference for hiding sensitive data in session recordings

UXCam ensures you can fulfil GDPR obligations. If you collect PII data (email, phone, credit card), use our APIs to hide it before it reaches UXCam servers.

Occlusion Methods Overview

MethodPurposePlatforms
OverlayCover entire screen with solid colorAll
BlurBlur entire screen (adjustable radius)All
Occlude All Text FieldsHide all text inputsAll except Flutter
Occlude Sensitive ViewHide specific UI elementsAll

Default Occlusions (No Code Required)

PlatformAuto-Occluded Elements
iOSText fields with password, creditCardNumber, newPassword, oneTimeCode content types
AndroidPassword fields with textPassword input type
React Native / SwiftUI / IonicElements with uxcam-occlude class or type="password"
FlutterNone by default (requires wrapper)
Jetpack ComposeNone (requires manual setup)

Dashboard Configuration (Recommended)

Configure occlusion rules without code changes via App Settings > Video Recording Privacy:

  • Global rules: Record, occlude, or blur all screens
  • Screen-specific rules: Different rules per screen
  • Text field occlusion: Hide all inputs on selected screens

Requires: iOS 3.6.0+, Android 3.6.0+, Flutter 2.3.1+, React Native 5.4.6+


SDK API Reference

Apply Overlay

Covers the screen with a solid color. Sensitive content is never recorded.

UXCamOverlay overlay = new UXCamOverlay.Builder()
    .withoutGesture(false)  // true = hide gestures (default)
    .screens(Arrays.asList("Screen1"))  // optional
    .build();
UXCam.applyOcclusion(overlay);
UXCam.removeOcclusion(overlay);
let overlay = UXCamOverlaySetting(color: .yellow)
UXCam.applyOcclusion(overlay)
UXCam.removeOcclusion(of: .overlay)
FlutterUXOverlay overlay = FlutterUXOverlay(color: Colors.red, hideGestures: true);
FlutterUxcam.applyOcclusion(overlay);
FlutterUxcam.removeOcclusion(overlay);
const overlay = { type: UXCamOcclusionType.Overlay, color: 0xff00ee, hideGestures: true };
RNUxcam.applyOcclusion(overlay);
RNUxcam.removeOcclusion(overlay);
UXCamCore.applyOcclusion(OverlaySetting())
UXCamCore.removeOcclusion()
UXCam.applyOcclusion(new UXCamOverlaySetting(UIColor.Yellow));
UXCam.applyOcclusion({ type: UXCamOcclusionType.Overlay, color: 0xff00ee });

Parameters:

ParameterTypeDescription
colorColorOverlay color
hideGestures / withoutGestureBooleanHide gesture recording (default: true)
screensListApply to specific screens only
excludeMentionedScreensBooleanIf true, apply to all screens except listed ones

Apply Blur

Blurs the screen while preserving layout visibility. Useful for maintaining context without exposing details.

UXCamBlur blur = new UXCamBlur.Builder()
    .blurRadius(10)  // default 20
    .withoutGesture(false)
    .build();
UXCam.applyOcclusion(blur);
let blur = UXCamBlurSetting(radius: 5)
UXCam.applyOcclusion(blur)
UXCam.removeOcclusion(of: .blur)
FlutterUXBlur blur = FlutterUXBlur(blurRadius: 10, blurType: BlurType.gaussian);
FlutterUxcam.applyOcclusion(blur);
const blur = { type: UXCamOcclusionType.Blur, blurRadius: 20, hideGestures: true };
RNUxcam.applyOcclusion(blur);
UXCamCore.applyOcclusion(BlurSetting())
UXCam.applyOcclusion(new UXCamBlurSetting(10));
UXCam.applyOcclusion({ type: 3, blurRadius: 20 });

Parameters:

ParameterTypeDescription
blurRadiusIntegerBlur strength (higher = more blur)
hideGesturesBooleanHide gesture recording (default: true)
screensListApply to specific screens only

Occlude All Text Fields

Hides all text input fields on screen.

UXCam.applyOcclusion(new UXCamOccludeAllTextFields());
UXCam.applyOcclusion(UXCamOccludeAllTextFields())
Not supported - use OccludeWrapper instead
RNUxcam.applyOcclusion({ type: UXCamOcclusionType.OccludeAllTextFields });
UXCamCore.applyOcclusion(OccludeAllTextFields())
UXCam.applyOcclusion(new UXCamOccludeAllTextFields());

Occlude Sensitive View

Hides specific UI elements containing sensitive data.

UXCam.occludeSensitiveView(View sensitiveView);
UXCam.occludeSensitiveView(sensitiveView)
OccludeWrapper(child: YourSensitiveWidget())
<Button ref={view => RNUxcam.occludeSensitiveView(view)} />
Text("Sensitive").uxcamOcclude()
Text("With gestures").uxcamOcclude(blockGestures: false)
UXCam.OccludeSensitiveView(sensitiveView);
<input class="uxcam-occlude" type="text" />

Configuration Object Setup

Apply multiple occlusions at SDK initialization:

UXConfig config = new UXConfig.Builder(appKey)
    .occlusions(Arrays.asList(blur, overlay, textFields))
    .build();
UXCam.startWithConfiguration(config);
let occlusion = UXCamOcclusion()
occlusion.apply(blurSetting, screens: ["LoginViewController"])
configuration.occlusion = occlusion
UXCam.start(with: configuration)
FlutterUxConfig config = FlutterUxConfig(userAppKey: "KEY", occlusions: [blur, overlay]);
FlutterUxcam.startWithConfiguration(config);
RNUxcam.startWithConfiguration({ userAppKey: 'KEY', occlusions: [overlay, blur] });

Platform Implementation Guides

For detailed implementation guides with best practices and troubleshooting:


Occlusion Priority Order

When multiple rules apply, priority is (highest to lowest):

  1. Dashboard: Screen-specific overlay
  2. Dashboard: Screen-specific blur
  3. Dashboard: Global blur/overlay
  4. SDK: Screen-specific overlay
  5. SDK: Screen-specific blur
  6. SDK: Global blur/overlay