$ npm install @exodus/react-native-screenshot-detectorNOTE: forked and adapted from https://github.com/blend/react-native-screenshot-detector
The goal is to prevent the user from taking screenshots in your app.
Accordingly, this library exports different APIs for Android and iOS. See Usage below.
$ npm install @exodus/react-native-screenshot-detector --save
$ react-native link @exodus/react-native-screenshot-detector
import ScreenshotDetector from '@exodus/react-native-screenshot-detector';
// iOS
ScreenshotDetector.subscribe(() => {
// yell at the user. We'll leave the choice of obscenities to you
})
// Android
ScreenshotDetector.disableScreenshots()
ScreenshotDetector.enableScreenshots()