Skip to main content
All CollectionsTest
[Migrated] Android Screenshots are Blank or Scrambled
[Migrated] Android Screenshots are Blank or Scrambled

App Center Test Reports show blank or scrambled screenshots on Android

Jihye E avatar
Written by Jihye E
Updated over 4 years ago

This content is now maintained here: https://docs.microsoft.com/appcenter/test-cloud/troubleshooting/android-screenshots

----------

If your App Center Test Reports consistently show blank or scrambled screenshots on Android; the typical cause is that the app has disabled screenshots. This is occasionally used in apps that handle very sensitive data like finance or medical information. 

From the Android documentation for the constant FLAG_SECUREin WindowManager.LayoutParams :

 Window flag: treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays.

WindowManager.LayoutParams FLAG_SECURE

FLAG_SECURE is handled differently from device to device and between different Android OS versions. Some devices or older Android versions will still allow screenshots, others show blank screens, and still others show scrambled screenshots.

If your app has disabled screenshots, then seeing blank or scrambled screenshots in the test report demonstrates this security feature is working as intended for your app.

If your app has disabled screenshots using FLAG_SECURE; but you want to see the screenshots in your test reports, then the recommended workaround in App Center Test is to create a testing build without FLAG_SECURE active.

See Also

Did this answer your question?