🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

react-native-cloud-prevent-capture

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-cloud-prevent-capture

Package to prevent screen recording and screenshots on android

0.1.14
latest
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created

react-native-cloud-prevent-capture

Package to prevent screen recording(on both platform ios and android) and screenshots (only on android)

Installation

npm install react-native-cloud-prevent-capture

Usage

import { startPreventingRecording, stopPreventingRecording,
  ON_SCREEN_CAPTURE,
  ON_SCREENSHOT,
  CloudPreventCaptureEvents
} from "react-native-cloud-prevent-capture";

// ...

//Launch this on pages where yo want to prevent recording and screenshots
try {
  const result = await startPreventingRecording();
} catch (err) {
  console.log("%c++ START PREVENT ERROR", "background: red", err);
}
// When you leave secure page
try {
  const result = await stopPreventingRecording();
} catch (err) {
  console.log("%c++ STOP PREVENT ERROR", "background: red", err);
}
//Listening to event on ios
CloudPreventCaptureEvents.addListener(
  ON_SCREEN_CAPTURE,
  res => console.log("Do something")
)

Contributing

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

License

MIT

FAQs

Package last updated on 11 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts