1.1.2 • Published 1 year ago

@exodus/react-native-screenshot-detector v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@exodus/react-native-screenshot-detector

NOTE: 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.

  • Android: possible via the FLAG_SECURE flag
  • iOS: impossible, but you can detect them

Accordingly, this library exports different APIs for Android and iOS. See Usage below.

Getting started

$ npm install @exodus/react-native-screenshot-detector --save

$ react-native link @exodus/react-native-screenshot-detector

Usage

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()
1.1.2

1 year ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

5 years ago

1.0.0

5 years ago