react-native-noscreenshot
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

react-native-noscreenshot

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.

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

Getting started

$ npm i react-native-noscreenshot

$ react-native link react-native-noscreenshot

Usage

import ScreenshotDetector from 'react-native-noscreenshot';

// iOS
this.eventEmitter = ScreenshotDetector.subscribe(() => {
  Alert.alert('Screenshot detected!');
});
ScreenshotDetector.unsubscribe(this.eventEmitter);

// Android
ScreenshotDetector.DisableScreenShot()
ScreenshotDetector.EnableScreenshot()

Readme

Keywords

Package Sidebar

Install

npm i react-native-noscreenshot

Weekly Downloads

6

Version

1.0.2

License

MIT

Unpacked Size

410 kB

Total Files

45

Last publish

Collaborators

  • shijianfeng