Closed alexandruvilcea closed 1 year ago
This issue needs more information before it can be addressed. In particular, the reporter needs to provide a minimal sample app that demonstrates the issue. If no sample app is provided within 15 days, the issue will be closed.
Please see the Contributing Guide for how to create a Sample App.
Thanks! Ionitron 💙
It looks like this issue didn't get the information it needed, so I'll close it for now. If I made a mistake, sorry! I am just a bot.
Have a great day! Ionitron 💙
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.
Bug Report
Plugin(s)
@capacitor/local-notifications@4.1.4
Capacitor Version
Platform(s)
Android
Current Behavior
I’m having issues with Local Notifications on Android. (All Android devices, and all versions of android). I’ve scheduled multiple notifications to trigger several times throughout the day, but the notifications are only delivered for a period of 2 hours after the app is closed. After the 2 hours have passed, the notifications are not delivered anymore. Notifications will always fire immediately after enter the app, or (which is even stranger) they will fire immediately after I plug in the charger. This is happening only on android, it never happened on iOS. Before closing the app, I always verify the pending notifications array and all notifications are there. And with every notification I’m scheduling, I am setting allowWhileIdle: true.
I’ve followed all the documentation here: Local Notifications Capacitor Plugin API | Capacitor Documentation
This is all on Capacitor 4 (Android SDK 32), and the plugin version is 4.1.4. I even tried with with Capacitor 5.
Any help would be appreciated with this. Thanks!
PS: The app is for scheduling tasks and sometimes I can have up to 4 notifications in an hour, rarely I schedule two notifications at the same time.
Expected Behavior
The app should be sending all notifications at the time they are scheduled, just as it happens on iOS, regardless of the time the app has been closed.
Code Reproduction