-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: LocalNotifications are not persisted between device reboot on Android #2830
Comments
this happens on Android only? you didn't check the platform checkbox can you provide a sample app? |
Hey, thanks for the reply. I am pretty sure it's Android only. I'll test it on iOS and get back to you. I'll try and create a sample app that repros but it should be as straight forward as what I mentioned in the issue. |
I have the same problem. The notifications won't trigger after I reboot the device. I've tested it on Android 10 device and also on emulators(Android 10-7). |
Same here. Tested on device and emulators (Android 9 and 10). |
Same problem with android 6 and 9 on phisical devices, this is annoying |
@jcesarmobile I won't be able to provide a sample app soon. In the meantime, this issue has gathered enough feedback to prove it's a real issue. The repro steps are enough to trigger the issue here. |
I am building an application, in which one of the key features is scheduling reminders, I faced the same issue in cordova(apparently the bug is open since 2017). Hope capacitor will fix the issue sooner. Since the localNotification is not working after restart, for the time being, I am using calendar events to set the reminder. |
Just updated this with a sample app. https://github.com/meltuhamy/cap-local-notification-persistence-bug |
^ not sure why those labels got added. It's android only. |
I am also have issues with this. I hope will be fixed soon! |
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 Capacitor, please create a new issue and ensure the template is fully filled out. |
Bug Report
Capacitor Version
npx cap doctor
output:💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 2.0.1
@capacitor/core: 2.0.1
@capacitor/android: 2.0.1
@capacitor/electron: 2.0.1
@capacitor/ios: 2.0.1
Installed Dependencies:
@capacitor/electron not installed
@capacitor/cli 2.0.1
@capacitor/core 2.0.1
@capacitor/ios 2.0.1
@capacitor/android 2.0.1
[success] Android looking great! 👌
Found 0 Capacitor plugins for ios:
[success] iOS looking great! 👌
Affected Platform(s)
Current Behavior
Local notifications that have been previously shceduled on Android aren't triggering after the device re-boots.
Expected Behavior
Local notifications that have been previously shceduled on Android should trigger after the device reboots.
Sample Code or Sample Application Repo
Sample app: I've created a new ionic app, here's the scheduling code: https://github.com/meltuhamy/cap-local-notification-persistence-bug/blob/master/src/pages/Home.tsx
Reproduction Steps
Other Technical Details
npm --version
output: 6.14.4node --version
output: v13.12.0pod --version
output (iOS issues only): N/AOther Information
It turns out that the notifications have to be re-scheduled on Android, otherwise Android will clear them on device boot.
The text was updated successfully, but these errors were encountered: