[BREAKGLASS] react-native-screen-capture allows you to protect screens in your app from being captured or recorded, as well as be notified if a screenshot is taken while your app is foregrounded.
Go to file
2022-12-30 17:01:53 +03:00
.vscode Split app.ios.js and app.android.js 2022-12-30 17:01:53 +03:00
android keep screen to keep awake 2022-12-30 12:45:47 +03:00
example Split app.ios.js and app.android.js 2022-12-30 17:01:53 +03:00
ios Update ScreenCapture.m 2022-12-30 17:00:37 +03:00
.gitignore Update .gitignore 2022-12-30 01:01:28 +03:00
index.js Initial commit 2022-12-28 13:24:14 +03:00
LICENSE Initial commit 2022-12-28 13:24:14 +03:00
package.json Update package.json 2022-12-30 12:46:02 +03:00
react-native-screen-capture.podspec Update react-native-screen-capture.podspec 2022-12-30 01:01:42 +03:00
README.md keep screen to keep awake 2022-12-30 12:45:47 +03:00
TODO Update TODO 2022-12-30 12:18:55 +03:00

react-native-screen-capture

Please do not install. It is under construction.

react-native-screen-capture allows you to protect screens in your app from being captured or recorded, as well as be notified if a screenshot is taken while your app is foregrounded.

Keep Awake provides a React hook that prevents the screen from sleeping and a pair of functions to enable this behavior imperatively.

Installation

npm i react-native-screen-capture

Usage

import ScreenCapture from 'react-native-screen-capture';

// disable screenshots
ScreenCapture.disallowScreenshot(true);

// enable screenshots
ScreenCapture.disallowScreenshot(false);

// Keep awake true
ScreenCapture.keepAwake(true);

// Keep awake false
ScreenCapture.keepAwake(false);

Roadmap

Status Platform Goal
Android Screenshot disable
🚧 iOS Screenshot disable
Android Keep awake on or off
🚧 iOS Keep awake on or off
🚧 Android Record capture disable
🚧 iOS Record capture disable

Contributing

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

License

MIT