Many a times we have seen App which detect and won’t allow us to take screenshots. So as an App developer on Xamarin, it’s quiet intriguing to know how to achieve that. Turns out, it’s just a line of code that would allow us to achieve that.
this.Window.SetFlags(WindowManagerFlags.Secure, WindowManagerFlags.Secure);
Setting up the Flags for Window Manager does the job. Now just add this in a Blank Android App and test it out. You will see that it works just like that.
Happy Coding!
Latest posts by Anubhav Ranjan (see all)
- Use TOTP for securing API Requests - July 12, 2024
- Backup Files from Ubuntu to Azure - December 14, 2023
- Read Gzip Log Files without Extracting - June 13, 2023
Can you have any idea how to restrict ios Screenshot in above ios 7