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
Clicking on notification action button does not dismiss notification on android terminated state #1991
Comments
I can't see the video and if you'd like to report a bug, then this should be done via the bug report and include a link to a repo of a minimal app that can reproduce the issue. This is best done via a fork of the repo and modify the example app to demonstrate this. In saying that, the example app shows that this is possible so I suggest you take a closer look at it and cross-reference it with what you've done. My guess is you've set https://pub.dev/documentation/flutter_local_notifications/latest/flutter_local_notifications/AndroidNotificationAction/cancelNotification.html to false. Here's a recording I took of the example app where you can see the notification is dismissed/cancelled after tapping on an action device-2023-05-12-215835.mp4 |
Hi @MaikuB thank you for the response. But the notification that you show in the recording is a foreground notification which you click after terminating the app. The scenario I mentioned in the issue was receiving the notification when the app is terminated. |
The state of the app when the notification appears has no impact on this. I could change the example to schedule notification with actions so that it appears after the app is terminated and the result is the same. device-2023-05-13-141721.mp4Note that you still need to provide a evidence of the issue with a link to repo hosting a minimal app that can reproduce this. Unless you're going to do this then this won't be looked into further and the issue will be closed. |
Hi @MaikuB, as requested I have forked the repo made changes to reproduce the issue. The change was to set Screen_Recording_20230514_122656.mp4 |
Thanks for providing this as this helped reproduce the issue. I have a fix in https://github.com/MaikuB/flutter_local_notifications/tree/fix-notification-action-terminated. Could you help verify that this solves the issue? You could also try using that branch with your app temporarily as well by following steps mentioned in https://dart.dev/tools/pub/dependencies#git-packages. Once you've confirmed this solves the issue, I'll have this merged in and released as a patch update |
Hi @MaikuB thanks for the swift action! I tested the code in two my own app and the example app and yes the changes work. Thanks for your effort! The recording of the new app is attached for reference. Screen_Recording_20230517_173834.mp4 |
Hi team. Thanks for the plugin. I'm facing an issue with notification actions.
When a user clicks on the notification action, while the app is in terminated state (cleared from recent apps), the notification is not dismissed and it stays.
The notification sent is a data message so we don't get an FCM notification as well (which does not show the action buttons).
Refer to the recording below.
Uploading Screen_Recording_20230512_112839_Pocketpills (Stg).mp4…
The text was updated successfully, but these errors were encountered: