registerWithoutEffect
Deprecated in v2.0.0
This function is deprecated. Use initSettings() with displayScreenguardOverlayAndroid: false instead, then call any register function.
(Android only) Activate screenguard without any visual effect (blur, image, color) for Android.
This uses FLAG_SECURE to block screenshot and screen recording without showing any overlay.
v2.0.0+ Requirement
You must call initSettings() before using this function.
Usage
import ScreenGuardModule from 'react-native-screenguard';
// Initialize first (required in v2.0.0+)
await ScreenGuardModule.initSettings();
// Activate without visual effect (Android only)
await ScreenGuardModule.registerWithoutEffect();
Platform Note
- This function only works on Android.
- On iOS, calling this function will show a console warning and do nothing.
- This is useful when you want to block screenshots without showing any visual overlay to the user.