Please don't mark question as duplicate.cuz FLAG_SECURE don't works for me.
As here someone had recommended to use setScreenCaptureDisabled,
But he didn't added any example and also I use xamarin.
So how do I use setScreenCaptureDisabled for disabling screen recording in xamarin ?
I need working code example for xamarin c#.
This is not possible in Android. You cannot prevent screen capture on a device that is not managed through a MDM provider. There is no DRM solution available to prevent screen capture for consumer Apps. The idea is that you are supposed to provide tools and features to your users, not prevent them from doing something.
The only thing you can do is to set the FLAG_SECURE
on the window to prevent it to show up when screen sharing or in screenshots.
This really has nothing to do with Xamarin, but rather, simply how Android works.