简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM