flutter_local_notifications
flutter_local_notifications copied to clipboard
Callback when notification is dismissed by user
If this applies to android only, please do it for at least android.
This is dependent on the Flutter team finishing the work on headless Dart execution. Also, I don't see this feature adding a lot of value to a lot of other devs (unless your original post gets upvoted by others though I have other priorities at the moment) so I would suggest once the Flutter team has finished their work (at which point I'll work on custom notifications actions) that you submit a PR for this
I think you've misunderstood what I was getting it. What I meant is that this functionality is of lower priority compared to other features that are used more often and other devs have expressed interest in e.g. custom actions. I don't see many apps that do something when a notification is dismissed, not to say they don't exist.
Bear in mind i'm trying to prioritise what I can work on given this is something I'm working on in my spare time. Currently I've already run into issues doing #21 that would help set the framework for #17 and this ticket. Hence why I'm asking if other devs in the community could assist in implementing features.
Yes, I'd misread your previous comment, which I why I deleted mine shortly after I posted it.
Thanks for the clarification.
I needed it so I implemented it ( #722 ). Like I said in there I don't have a Mac so it's an Android only PR, but hopefully someone else can do the other part ?
Irrelevant for now - details (discussion) are in the PR
@MaikuB My use case for this feature is to create a grouping for message notifications.
From what I could gather, I must have a summary for all notifications I want to group together. Also, if one of the notifications is dismissed, I should update the summary (since it contains the text for the dismissed notification, which isn't longer in the group).
Is there a way around it / another way you recommend? or perhaps one of the details I understood is incorrect?
If the changes you have in your PR work for your scenarios (i.e. you don't care that it won't work when the app is killed) then I'd suggest to continue using your own fork. If you do need it working even when the app isn't running then the only way is likely what I've suggested here, where upi move more of the notification logic to be on the Android side i.e. handle what happens when a notification is dismissed without trying to run any Dart code
I went with a fork.
For anyone else that's interested: https://github.com/matanshukry/flutter_local_notifications/releases/tag/flutter_local_notifications-msh-v1.4.4%2B2
I believe it's now working and stable, but I've only used it for my use case so tread lightly. If there are any issues with it feel free to open any against it.
Hello @MaikuB, how is the Dart headless thing going? We're moving from fancy conversation notifications to simple and regular ones just because we can't get a callback when the user removed a notification in the system tray.
Do you think it could work in any other way? For example, having the callback in the native side of the app instead of the Flutter one...?
I get the same case, any update for this case?
Any Update ?