flutter_local_notifications icon indicating copy to clipboard operation
flutter_local_notifications copied to clipboard

Callback when notification is dismissed by user

Open radzish opened this issue 6 years ago • 10 comments

If this applies to android only, please do it for at least android.

radzish avatar Jul 08 '18 11:07 radzish

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

MaikuB avatar Jul 09 '18 08:07 MaikuB

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.

MaikuB avatar Sep 03 '18 10:09 MaikuB

Yes, I'd misread your previous comment, which I why I deleted mine shortly after I posted it.

Thanks for the clarification.

ciw1973 avatar Sep 03 '18 10:09 ciw1973

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

matanshukry avatar Jul 20 '20 11:07 matanshukry

@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?

matanshukry avatar Jul 20 '20 12:07 matanshukry

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

MaikuB avatar Jul 20 '20 12:07 MaikuB

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.

matanshukry avatar Jul 21 '20 18:07 matanshukry

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...?

rocboronat avatar Mar 01 '22 14:03 rocboronat

I get the same case, any update for this case?

wahyu-handayani avatar Jul 21 '22 03:07 wahyu-handayani

Any Update ?

pranavo72bex avatar May 03 '23 10:05 pranavo72bex