How to disable screen mirroring?

Viewed 3273

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?

1 Answers

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.

Related