Reputation: 985
My app stores something in the Android Keystore with Lock Screen protection.
To get the user to authenticate, I call KeyguardManager.createConfirmDeviceCredentialIntent and use startActivityForResult with the Intent.
On previous versions of Android, I can take a screenshot of the lock screen dialog that appears. When I try on Android 8, I get a notification that says
Couldn't capture screenshot.
Taking screenshots isn't allowed by the app or your organization
I am able to take a screenshot of the "normal" lock screen when unlocking the device, and also in the settings when changing the lock screen. So I don't think it's my "organization" preventing me.
How can I configure my app to allow screenshots to be taken on this screen?
Solutions I found on the web say to rename the Pictures directory on the device storage to Pictures2, but that solution didn't work for me. I have encountered this issue on the Google Pixel and the Nexus 5X.
Upvotes: 0
Views: 723
Reputation: 21
Android app has specified FLAG_SECURE specified. The app itself is preventing screenshots https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE
Upvotes: 0