I want to protect an app against any kind of recordings possible, may it be screenshots or screen-recordings. I know I can use the library flutter_windowmanager to set a flag preventing screenshots and making the screen-recordings show a black screen, but audio can still be captured anyway, and I want to prevent this to.
Is there any way to do this? Preventing screen-recordings or recording nothing at all both are good enough solutions.
I have tried using several options, for example the libraries audio_session and screen_capture_event, and the class WidgetsBindingObserver, all without success.
2
Answers
For Android:
For Example :
For iOS:
directory in your Flutter project.
Example :
see this great article by Gulshan Yadav: https://mrgulshanyadav.medium.com/prevent-screenshot-and-video-recording-in-flutter-93839325d66c
You can use screen_protector. and turn it on and off as below. it will avoid your app screen recording or taking screenshots