Privacy and video

Disabling video

Video recording can be disabled completely using VideoEnabled launch option. See configuration for more info.

Protect activities

You can protect any activity and prevent it from being recorded by adding it's class to the list of secure activities. Whenever user navigates to such activity, we substitute the actual screen content with black frames and stop recording touch events.


Activities with system flag FLAG_SECURE are protected from video and touches recording without necessity to call any Bugsee methods. This flag can be set to activity in the following way.

protected void onCreate(Bundle savedInstanceState) {
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);

Protecting views

You can prevent any view from being recorded by adding it to the list of secure views. When such views are visible, we substitute actual view with black rectangle in video frame.

Marking view as protected in xml layout

Protected views can be marked in xml layout by adding app:bugsee_secure attribute to the protected view. This attribute can be set to boolean or reference to boolean value. In order to prevent showing Lint warning, related to the attribute, you can add tools:ignore="MissingPrefix" line to your protected view declaration. Protected view must have id attribute.

<!-- LinearLayout is used only for example -->
    xmlns:app="" <!-- You can use arbitrary name instead of "app" -->

    <View android:id="@+id/my_secret_view1"
        app:bugsee_secure="true" <!-- Boolean value -->

    <View android:id="@+id/my_secret_view2"
        app:bugsee_secure="@bool/enable_bugsee_hide" <!-- Reference to boolean value -->

Then it is enough to call one method in code of your activity just after setContentView() method call.

protected void onCreate(Bundle savedInstanceState) {

    Bugsee.addSecureViews(R.layout.your_layout_name, this);

Marking view as protected in code

The alternative approach is to mark each protected view in code.


    // View is substituted by black rectangle in video.


Protected web page elements

You can also prevent any web page element, shown in WebView, from being recorded by adding class="bugsee-hide" to it.

<input type="text" class="bugsee-hide">

Elements with type="password" are not recorded by default. If you want such web page element to be recorded, add class="bugsee-show" to it.

<input type="password" class="bugsee-show">

Bugsee detects WebViews automatically, but if you use WebView.setWebViewClient() method, it is necessary to call Bugsee.addSecureWebView() method to prevent recording of protected web page elements in this WebView.

WebView webView;
// Initialize WebView
webView.setWebViewClient(new WebViewClient());

There is one more case, when it is necessary to call Bugsee.addSecureWebView() method - if you add WebView to Activity dynamically and set ViewGroup.OnHierarchyChangeListener to the WebView parent.

public class WebViewActivity extends BaseActivity {
    protected void onResume() {

        ViewGroup contentContainer = (ViewGroup)findViewById(; // ViewGroup in Activity layout.
        WebView webView;
        // Initialize WebView

    private final ViewGroup.OnHierarchyChangeListener mHierarchyChangeListener = new ViewGroup.OnHierarchyChangeListener() {

Protecting by coordinates

You can also protect rectangle on screen from being recorded by adding it to the list of secure rectangles. It can be especially useful in games, since there is no views there which can be made secure, and objects are drawn on canvas in case of 2D and on surface in case of 3D.

// Add secure rectangle.
Bugsee.addSecureRectangle(new Rect(100, 100, 200, 200));
// Get all secure rectangles.
ArrayList<Rect> secureRects = Bugsee.getAllSecureRectangles();
// Remove single rectangle from the list of secure rectangles.
Bugsee.removeSecureRectangle(new Rect(100, 100, 200, 200));
// Clear the list of secure rectangles.

Note, that secure rectangle coordinates remain the same after screen orientation change. But if necessary you can remove old secure rectangles and add new ones when, for example, Activity is being recreated on orientation change.

Going dark

In some rare cases you might want to conceal the whole screen and stop recording events completely. The following APIs will come in handy, no data is being gathered between the calls to pause and resume.

The following APIs will come in handy, no video or touch events are being gathered between the calls to pause() and resume() below:

    // To stop video recording use   

    // No touches are recorded, black frame is being recorded instead of actual data in the video.

    // And to continue