I'm trying to make a secure Android app. I really want to be able to ignore screen recording software that likes to run in the background and turn off its features. I've tried using SECURE FLAG to avoid screenshots, but I'm not sure if it can block screen videos either. Do you have any suggestions on how to lock screen captures, whether it's video or screenshots?
Solution
I would say that it is impossible to completely prevent screen/video capture from any Android app through supported means. But if you just want to block it for regular Android devices, SECURE FLAG is essential.
Preventing someone from taking screenshots on an Android device may not be completely possible, as the Android system is designed to give users freedom. However, you can take steps to make it more difficult or even restrict someone's ability to take screenshots. Keep in mind that these steps are not foolproof or completely secure, and users may still find ways around these restrictions.
Special Development:
Develop custom applications for your own devices by implementing additional security or screenshot restrictions.
Just use the following code
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
Use Third Party Security Apps:
There are several third-party security apps that can help you limit a user's ability to take screenshots. Some of these apps may require the user to enable special permissions or perform additional configuration.
Settings in the App:
Some apps may have internal settings that allow you to disable the ability to take screenshots. Check the security or privacy settings within the app.
Full Access Rights (Root):
By "rooting" your Android device, you can gain full access to the operating system. However, rooting your device can void your warranty and pose potential security risks. Once your device is rooted, you may be able to use additional apps or scripts to limit screenshot capabilities.
Please note that restricting a user's ability to take screenshots may detract from the user experience and may be considered invasive. Additionally, some devices or versions of Android may not support all of these methods. Therefore, consider carefully before implementing such restrictions, and ensure that they are in accordance with your device's privacy policy and usage rules.