I want to disable the specific permission ( Screen Capture / Screenshot ) from android Media Projection API (like Netflix). I could not find it from Andriod.Permission. Do I need to define it in manifest or is there any other work around?
And I also want to disable the screen capture just on certain scenes? Is that possible? or not disabling for the whole game is also enough.
You’ll have a lot more luck probably googling for this on the Android developer pages. There won’t be any direct exposure of this in Unity, but you may be able to use some of the UnityEngine.Android namespace of functions to implement it yourself.
You can secure screen capturing functionality by adding FLAG_SECURE into your Activity as follows
getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE); ```
source :https://stackoverflow.com/questions/30617750/prevent-other-applications-form-capturing-recording-screen/30618030#30618030
Now you will ask me : how to setFlags from Unity ? You need to call the android functions from Unity.
To do that here are some documentations :
https://medium.com/android-news/unity-and-android-connecting-the-dots-6368b31e86c5
https://docs.unity3d.com/Manual/PluginsForAndroid.html