react-native-push-notification
react-native-push-notification copied to clipboard
SecurityException: Caller needs to hold android.permission.SCHEDULE_EXACT_ALARM to set exact alarms
Shouldn't one call AlarmManager.canScheduleExactAlarms() to check if we can use exact alarms before using them here? https://github.com/zo0r/react-native-push-notification/blob/fcf40a05175bb79fb5fdfe2ac31bb797bc5008bc/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java#L176-L184
I'm seeing a SecurityException from this method when this permission is not granted.
The code already has a fallback path that doesn't use exact alarms, so it seems like something that could be implemented easily.