-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Multiple entries with same notification ID in pending notifications #898
Comments
Thanks for finding this and providing the info as I was able to use this to reproduce the problem. Your suspicion is correct and I have a PR for this #899. The side effect you're seeing is due to old notifications being rescheduled and the behaviour of Android's |
I've tested the PR/branch with my app. Works as expected now. Thank you so much for looking into this. |
FYI that I'll need to revert the check for future notifications within the Android native code. There's a scenario where might be possible for a device to be off whilst the notification should appear and it should show up when the device turns on again |
Noted on that. Thanks. |
Describe the bug
To Reproduce
Other observation (could be related?):
After a few days of notification firings, on rebooting, multiple notifications were fired at once. Also happens on package update.
Issue does not happen when either one of this is true:
Expected behavior
Plugin code causing the problem
flutter_local_notifications/flutter_local_notifications/android/src/main/java/com/dexterous/flutterlocalnotifications/FlutterLocalNotificationsPlugin.java
Line 412 in 4111de4
Suspected improper Integer equality test of notification id before saving to preferences.
Suggested fix
To use equals() method for Integer equality test instead.
The text was updated successfully, but these errors were encountered: