Sensitive Data Occlusion and Screen Blurring

🚧

Important Notice

Currently, new screen occlusion methods and screen blurring are only supported on iOS v3.4.1+, Android v3.4.0+ and Flutter v2.1.0 SDKs.

Once more frameworks are supported, we will update the necessary steps to benefit from the new occlusion configurations.

For legacy occlusion APIs, please refer to the Hide Sensitive Data subpage on these guides.

From the latest SDK versions, it's possible to hide sensitive data in your app by creating a configuration object and applying several customizable settings to it in order to achieve the desired aspects of occlusion in your app.

Overlay

You can configure different overlay options with the following:

UXCamOverlay overlay = new UXCamOverlay.Builder()
                              .withoutGesture(false)
                              .build();

UXCam.applyOcclusion(overlay); //To apply overlay
UXCam.removeOcclusion(overlay); //To remove overlay
let overlay = UXCamOverlaySetting(color: .yellow)

UXCam.applyOcclusion(overlay)

UXCam.removeOcclusion() // This removes all manual occlusion
UXCam.removeOcclusion(of: .overlay)  // This removes manual occlusion of type overlay
import 'package:flutter_uxcam/uxoverlay.dart'; //Import this for Overlay

FlutterUXOverlay overlay = FlutterUXOverlay(
        color: Colors.red,
        hideGestures: true // optional, default true
    );

FlutterUxcam.applyOcclusion(overlay); //To apply overlay
FlutterUxcam.removeOcclusion(overlay); //To remove overlay

Available overlay options are:

withoutGesture(boolean withoutGesture) || hideGestures(boolean hideGestures)
Allows the user to configure wether to capture gesture in the occluded screen or not. Passing in false to this method tells the SDK to capture gestures. Default is true, so by default the gestures are not captured.

screens(List < String > screens) - Use it in the configuration object
Allows you to define the screens where the overlay is to either be applied or not, depending on the value passed to excludeMentionedScreens(boolean excludeMentionedScreens).

By default, if no screens are passed, the overlay is applied to all the screens unless explicitly removed. This acts as a global setting and will override all other occlusion settings defined for all screens. The occlusion must be removed to revert this action.

If screens are passed, you have the ability to either apply overlay on the mentioned screens or to exclude the mentioned screens from being overlayed.

excludeMentionedScreens(boolean excludeMentionedScreens)
This option should be used in conjunction with screens(List < String > screens).

If the passed in value is true, it tells the SDK to exclude the mentioned screens from occlusion, while applying the occlusion to the rest of the screens in the app.

If the passed in value is false, it tells the SDK to apply occlusion only to the screens that have been passed.

Default value is false.


Blur

Blur is a new occlusion API that allows you to blur screen records of screens. This lets you obtain information regarding the state of the screen and user interaction, while also maintaining privacy in sensitive screens.

This is useful to set all the occlusion/Blur from one place of the application without having to set it individually in different screens.

You can configure different options using the following:

UXCamBlur blur = new UXCamBlur.Builder().build();

//Example
UXCamBlur blur = new UXCamBlur.Builder()
                      .blurRadius(10) //default 20
                      .withoutGesture(false)
                      .build();

UXCam.applyOcclusion(blur); //To apply the Blurring
let blurSetting = UXCamBlurSetting(radius: 5)
UXCam.applyOcclusion(blurSetting)

UXCam.removeOcclusion() // This removes all manual occlusion
UXCam.removeOcclusion(of: .blur) // This removes manual occlusion of type blur
//Import this on the screen you are trying to Blur
import 'package:flutter_uxcam/uxblur.dart';

FlutterUXBlur blur = FlutterUXBlur(
        blurRadius: 10,
        blurType: BlurType.gaussian,
        hideGestures: true // optional, default true
    );

FlutterUxcam.applyOcclusion(blur); //To apply blur
FlutterUxcam.removeOcclusion(blur); //To remove blur

Available blur options are:

blurRadius(int blurRadius)
This option allows you to define the blur radius to be used for blurring. The higher the value, the more blurred the resulting video is going to be.

withoutGesture(boolean withoutGesture) || hideGestures(boolean hideGestures)
Same as overlay. Please refer to overlay section.

screens(List < String > screens) - Use it in the configuration object
Same as overlay. Please refer to overlay section.

excludeMentionedScreens(boolean excludeMentionedScreens)
Same as overlay. Please refer to overlay section.

You'll see your desired screens with a blur on top.You'll see your desired screens with a blur on top.

You'll see your desired screens with a blur on top.

Examples on blur radius property customization:

Blur radius customization examplesBlur radius customization examples

Blur radius customization examples


Occlude all Text Fields

Similar to the new Overlay and Blur APIs:

//Create the object
UXCamOccludeAllTextFields occludeFields = new UXCamOccludeAllTextFields();

UXCam.applyOcclusion(occludeFields); //To apply occlusion
UXCam.removeOcclusion(occludeFields); //To remove the occlusion
let hideTextfields = UXCamOccludeAllTextFields()

UXCam.applyOcclusion(hideTextfields) //To apply occlusion

UXCam.removeOcclusion() //This removes all manual occlusion
UXCam.removeOcclusion(of: .occludeAllTextFields) // This removes manual occlusion of type occlude text fields
Not supported

Usage from configuration object

It's also possible to pass a list of occlusions to be applied during configuration. For example:

UXCamBlur blur = new UXCamBlur.Builder()
        .blurRadius(20)
        .screens(Arrays.asList("ActivitySecret", "LoginActivity"))
        .build();

UXCamOverlay overlay = new UXCamOverlay.Builder()
        .screens(Arrays.asList("PaymentActivity", "ProfileActivity"))
        .build();
        
UXConfig config = new UXConfig.Builder(appKey)
        .occlusions(Arrays.asList(blur, overlay))
        .setAutomaticScreenNameTagging(true)
        .enableImprovedScreenCapture(true)
        .build();
UXCam.startWithConfiguration(config);
let configuration = UXCamConfiguration(appKey: "YourAppKey")

let blurSetting = UXCamBlurSetting(radius: 5)
let overlay = UXCamOverlaySetting(color: .yellow)
let occlusion = UXCamOcclusion()
    
blurSetting.hideGestures = false 
occlusion.apply(blurSetting, screens: ["LoginViewController"]) 

configuration.occlusion = occlusion
configuration.enableAutomaticScreenNameTagging = false 
configuration.enableAdvancedGestureRecognition = false 

UXCam.optIntoSchematicRecordings()
UXCam.start(with: configuration)
import 'package:flutter_uxcam/uxblur.dart'; //Import this for Blurring
import 'package:flutter_uxcam/uxoverlay.dart'; //Import this for Overlay

FlutterUXBlur blur = FlutterUXBlur(
    blurRadius: 10, 
    blurType: BlurType.gaussian, 
    hideGestures: true 
    screens: [“LoginScreen”, “PaymentScreen”] 
);

FlutterUXOverlay overlay = FlutterUXOverlay(
   color: Colors.red 
   hideGestures: true 
   screens: [“LoginScreen”, “PaymentScreen”]
);

FlutterUxConfig config = FlutterUxConfig(
    userAppKey: "UXCAM_APP_KEY", 
    occlusions: [blur] // can contain blur and overlay
); 

FlutterUxcam.startWithConfiguration(config);