Android secure layout

Some Android apps use the FLAG_SECURE setting to protect sensitive screens in applications. The flag treats the content of a window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays. For more details on the flag, see the Android Developer documentation.

Overview

The behavior of secure layout differs between Android versions.

Android version Behavior
Android 8 - 11 Screens with secure layout are displayed in the remote view.
Android 12 -13 Screens with secure layout are not displayed in the remote view. A message that a secure window was detected is displayed instead.
Android 14 and later Views with secure layout are not displayed in the remote view. The rest of the screen is displayed.

Back to top

Display secure layout views

Secure layout prevents certain views from being displayed in the remote view.

To display views with secure content on Android 12 and later:

  • Ask your developers to create a testing version of the app that does not use the FLAG_SECURE setting.
  • Alternatively, use the packaged version of the app or use the Android Enabler to remove the flag. For details, see Package an Android app manually.

Chrome incognito mode and OS authentication views also use secure layout. Follow the steps below to view secure content in these scenarios.

Chrome incognito tab content does not display

When opening an incognito tab on the Chrome browser, a "Showing secure content" message is displayed and the content of the tab cannot be viewed.

Workaround:

Enable the Incognito Screenshot flag on the Chrome browser.

  1. Open the Chrome browser from the Android device.

  2. Go to chrome://flags.

  3. Search for “Incognito Screenshot” in the list and set the value to Enabled.

  4. Relaunch the Chrome browser.

Unable to remove the FLAG_SECURE setting or to view OS authentication screens

If you need to interact with secure screens and cannot modify the app, use the Accessibility Inspector as an alternative approach.

  1. Click the Accessibility testing button Accessibility testing in the side pane of the device access window.
  2. Select the Inspector tab, and switch on Accessibility Inspector.
  3. Click the Show all elements button . Screen elements are marked with their accessibility frame.
  4. Use the element properties in the right hand pane to identify the screen elements and to perform actions on the screen.