I am making an app in which students can give their test online and i would like to restrict them from taking screenshots or record screen on both iOS and android. So far i have come across android solutions. I want to figure out how to do it in both android and iOS.
Asked
Active
Viewed 445 times
0
-
I disabled screenshot and screen recording in android using this code. Still confused on how to achieve in iOS ` if (app.android) { const window = app.android.startActivity.getWindow(); window.setFlags(android.view.WindowManager.LayoutParams.FLAG_SECURE, android.view.WindowManager.LayoutParams.FLAG_SECURE); } } }` – Abdullah Nov 16 '20 at 05:14
1 Answers
0
Preventing screenshots on Android
you can use below code.
if (app.android) {
const window = app.android.startActivity.getWindow();
window.setFlags(android.view.WindowManager.LayoutParams.FLAG_SECURE,
android.view.WindowManager.LayoutParams.FLAG_SECURE);
}
However, I want to know how to prevent screenshot on iOS, Could anyone please provide more details.

Saman Gholami
- 3,416
- 7
- 30
- 71

MyintMyatThurein
- 1
- 1
-
Yeh i did the same thing in my comment above. I asked this question on Apple developers forum as well and I received a reply that it's not possible [link](https://developer.apple.com/forums/thread/666812) – Abdullah Nov 17 '20 at 06:33