5

How to block the app to screen mirroring? As i check the FLAG_SECURE,

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

The from being viewed on non-secure displays is to block screen mirroring? if not, what does it means? And whether we can find some way to prevent the app from the screen mirroring?

chancyWu
  • 14,073
  • 11
  • 62
  • 81

1 Answers1

0

The FLAG_SECURE will prevent screenshots of your app and if the screen is recorded it will show a full black screen to prevent sensitive data being displayed for example.

But it does not block screen mirroring / casting unfortunately. There is no way to do it currently with the Android framework.

Cyril
  • 580
  • 2
  • 11
  • 23