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, keep the screen from going to sleep. iOS and Android
npm i react-native-screen-captureimport { disallowScreenshot, keepAwake } from 'react-native-screen-capture';
// disable screenshots
disallowScreenshot(true);
// enable screenshots
disallowScreenshot(false);
// Keep awake true
keepAwake(true);
// Keep awake false
keepAwake(false);| Status | Platform | Goal |
|---|---|---|
| ✅ | Android | Screenshot disable |
| ✅ | iOS | Screenshot disable |
| ✅ | Android | Keep awake on or off |
| ✅ | iOS | Keep awake on or off |
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
