zetavg / react-native-system-notification

Android system notifications for React Native. Supports push notifications with GCM integrated.
https://www.npmjs.com/package/react-native-system-notification
244 stars 102 forks source link

Delayed/Scheduled Notification firing too late #79

Closed MrToph closed 7 years ago

MrToph commented 7 years ago

I had the issue that some delayed/scheduled Notifications using delay or sendAt are sometimes firing up to a minute later. In case anyone else has this issues and needs a solution, it's because this API uses AlarmManager.set in Notification.java which is inexact since SDK version >= 19. I switched to AlarmManager.setExact instead and I haven't seen any notifications firing late yet. See also this question on stackoverflow. Not sure if this should be the new standard though as this approach consumes more resources / battery power in comparison with the other.