Open TulioMeran opened 1 year ago
same
This is a permission available only for system apps. I don't understand why it's used.
The only way I found for compile is to avoid the compilation for the line referencing this permission.
Inside the source code of the module, navigate to -> src\main\java\com\dieam\reactnativepushnotifications\modules\RNPushNotificationActions.java
before ln 65, add this comment:
//noinspection MissingPermission <---add this comment
context.sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
Hope this helps, at least for compiling, i have not tested yet what happens when I send a notification after this...
any update on this issue ?
I am also experiencing the same issue
I found workaround.
I commented line in file com.dieam.reactnativepushnotification.modules.RNPushNotificationActions:
// context.sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
Maybe better approach is using this line only for android below 12:
if (android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.S) {
//noinspection MissingPermission
context.sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
}
I found workaround. I commented line in file com.dieam.reactnativepushnotification.modules.RNPushNotificationActions:
// context.sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
Maybe better approach is using this line only for android below 12:
if (android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.S) { //noinspection MissingPermission context.sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)); }
Is there any better solution to fix this issue? i have the same problem with RN 0.74 and RNPN 8.1.1
Fix this!
Bug
When i run ./gradlew build i'm getting this error:
React native version: 0.72.4 React-native-push-notification: 8.1.1