Skip to content
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

fix(android): restore local notifications after device reboot #3027

Merged
merged 6 commits into from
Jul 10, 2020
Merged

fix(android): restore local notifications after device reboot #3027

merged 6 commits into from
Jul 10, 2020

Conversation

tntwist
Copy link
Contributor

@tntwist tntwist commented Jun 1, 2020

Hi,
this should fix #2830

Here are the changes I made:

  • Saves notification json instead just saving the id
  • Adds BroadcastReceiver for restoring local notifications

Please review the changes.

Kind regards

@carlpoole carlpoole merged commit 2a39a7d into ionic-team:master Jul 10, 2020
@carlpoole
Copy link
Member

Thank you for your contribution. I tested the changes with the sample app submitted to #2830 by @meltuhamy here https://github.com/meltuhamy/cap-local-notification-persistence-bug. I reproduced the issue and verified the changes fix the re-scheduling of notifications after reboot.

@StefanFlaschko
Copy link

StefanFlaschko commented Mar 8, 2022

Hey Team,

In what Version of Capacitor that Issue got fixed?
I'm still having the Problem that local notifications get lost after a device restart.

I'm using the Ionic Framework Version 5.4 with:
"dependencies": {
"@capacitor/android": "3.3.3",
"@capacitor/app": "1.0.6",
"@capacitor/core": "3.4.0",
"@capacitor/haptics": "1.1.3",
"@capacitor/ios": "3.3.3",
"@capacitor/keyboard": "1.1.3",
"@capacitor/local-notifications": "^1.0.9",
"@capacitor/status-bar": "1.0.6",
"@ionic/storage": "^3.0.6",
"@ionic/vue": "^5.4.0",
"@ionic/vue-router": "^5.4.0",

Is there anything I need to do to make it work ?

Thanks a lot for your answer.

Update:

I tried the App with local notifications on a newer Android Version 11 and here it works fine also after restarting the device.
On the older Android Version 9 it doesn't work.

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

Successfully merging this pull request may close these issues.

bug: LocalNotifications are not persisted between device reboot on Android
3 participants