Abdullah
Abdullah

Reputation: 39

How to disable screenshot in android and ios in nativescript angular

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.

Upvotes: 0

Views: 672

Answers (1)

MyintMyatThurein
MyintMyatThurein

Reputation: 1

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.

Upvotes: 0

Related Questions