Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Caller APPID needs to hold android.permission.SCHEDULE_EXACT_ALARM or android.permission.USE_EXACT_ALARM to set exact alarms. #2415

Open
mabc21 opened this issue Jul 11, 2024 · 2 comments

Comments

@mabc21
Copy link

mabc21 commented Jul 11, 2024

Device info: Android 13 and 14
React-native-push-notification version: 8.1.1

In AndroidManifest I used to have

BUT google wants to remove USE_EXACT_ALARM if your app's main core functionality is not an alarm clock or a calendar. I removed USE_EXACT_ALARM and now my app is crashing when sending local notifications.

@felipe-xavier
Copy link

Hi, I got this issue too.
I found 2 possible solutions, but not implemented for production from our side yet:

  1. Use the notifee libraby with method getNotificationSettings:
    https://notifee.app/react-native/docs/triggers#android-12-limitations

  2. Use native code no AndroidManifest.xml file according to this article:
    https://medium.com/@aarie33/schedule-exact-alarms-are-denied-by-default-onandroid-14-ccbfbf54586c

I hope some of these solutions work for you and others. But wonder if this will be updated from react-native-push-notification side as well.

@thomasarogers
Copy link

thomasarogers commented Aug 22, 2024

I am having this issue and trying to fix with the second recommendation by felipe-xavier but when I display the modal for Users to grant the permission it is greyed out and cannot be enabled? Any ideas anyone?
Screenshot_20240822-111556

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants