react-native-capture-protection
simple control capture event (like screenshot, screen record) in Android, iOS Native
Installation
npm install react-native-capture-protection
Preview
prevent, allow screenshot in iOS
Usage
import {
CaptureProtection,
CaptureProtectionModuleStatus,
} from 'react-native-capture-protection';
CaptureProtection.addRecordEventListener(({ status, isPrevent }) => {
if (
status == CaptureProtectionModuleStatus.RECORD_DETECTED_START &&
isPrevent?.record
) {
Alert.alert('Warning', 'record detected');
}
});
await CaptureProtection.preventScreenRecord();
await CaptureProtection.allowScreenRecord();
More Infomation, please read this
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