Open crazywook opened 3 months ago
I also have this issue, for me the fix was to pin it to 1.0.0 for now. Hope it still will be fixed
hi @crazywook, working on it, will have a release soon.
You can also fix it yourself by opening the android
folder in your current project by Android studio, and go to react-native-screenguard/java/com/screenguard/ScreenGuardColorActivity.java
, line 94, and change like this:
...
registerReceiver(closeReceiver, intentFilter, RECEIVER_NOT_EXPORTED);
...
thanks and happy hacking !
go to react-native-screenguard/java/com/screenguard/ScreenGuardColorActivity.java, line 94, patch the package
IntentFilter intentFilter = new IntentFilter(SCREENGUARD_COLOR_ACTIVITY_CLOSE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { // Android 13+
registerReceiver(closeReceiver, intentFilter, Context.RECEIVER_NOT_EXPORTED);
} else {
registerReceiver(closeReceiver, intentFilter);
}
I have fixed this issue by apply above patch
I recently updated react-native-screenguard from version 1.0.0 to 1.0.2. After the update, I encountered a compilation error related to ContextCompat.RECEIVER_NOT_EXPORTED in the ScreenGuardColorActivity.java file. This issue did not occur in version 1.0.0.
Please let me know if there is any other recommended solution or if this can be fixed in the next release.
Thank you for your assistance.