How to detect when capturing a screen using (MediaProjection, VirtualDisplay) if the window or an app has SECURE_FLAG in Android?

337 views Asked by At

I'm trying to capture screenshots in my android app using MediaProjection by creating VirtualDisplay. It's working fine except in some banking or streaming apps where I get a black screen. I know that it's because in those apps SECURE_FLAG is applied.

My question is, How to detect in my app that the app I'm trying to screenshot has SECURE_FLAG?

0

There are 0 answers