0.1.14 • Published 2 years ago

react-native-cloud-prevent-capture v0.1.14

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

0.1.14

2 years ago

0.1.13

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago