react-native-prevent-screenshot-ios-android
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

react-native-prevent-screenshot-ios-android

This package allows user to block taking screenshot, screen recording and screen sharing of specific screens for both Android and IOS apps

Installation

npm install react-native-prevent-screenshot-ios-android

Usage

import { enableSecureView, disableSecureView, forbidAndroidShare, allowAndroidShare } from 'react-native-prevent-screenshot-ios-android';
import { Platform } from 'react-native'
// ...

if (Platform.OS === 'android') {
  forbidAndroidShare(); //This function blocks the Screen share/Recording and taking screenshot for android devices.
  allowAndroidShare(); //This function allows to provide back the Screen share/Recording and screenshot functionality for android devices
}
if (Platform.OS == 'ios') {
  enableSecureView(); //This function blocks the Screen share/Recording and taking screenshot for iOS devices.
  disableSecureView(); //This function allows to provide back the Screen share/Recording and screenshot functionality for iOS devices
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Package Sidebar

Install

npm i react-native-prevent-screenshot-ios-android

Weekly Downloads

47

Version

1.1.0

License

MIT

Unpacked Size

48.2 kB

Total Files

27

Last publish

Collaborators

  • praveencena88