Replies: 8 comments 1 reply
-
Interesting idea! I need to think a bit about how this might work. Likely a special token in the notification configuration that signals you want to group similar ones, and a few new tokens. For example, the notification config might read "{groupBy myGroup}Downloading files: {finished}/{total}" which would group all notifications that have that same '{groupBy myGroup}' token, and the tokens {finished} and {total} then refer to the number of files finished / total in that batch. Let me know what you think. |
Beta Was this translation helpful? Give feedback.
-
You summed it up very well. I think that could be useful. Until then, I'll have to see how I deal with it. Should I not set a running notification, does that affect how it works in terms of downloading in the background or something? Thank you! |
Beta Was this translation helpful? Give feedback.
-
The notification doesn't affect the download (unless you've configured the downloader to 'runInForeground', which does require a notification). On modern Android platforms I do believe the notifications are grouped already, so unless you expand the notification the user won't see all the individual ones. But yes, you could also just not notify |
Beta Was this translation helpful? Give feedback.
-
Planning to include this in V8 along with other changes, so may take a while |
Beta Was this translation helpful? Give feedback.
-
Issue #183 may be solvable with notificationGroups as well, and/or a |
Beta Was this translation helpful? Give feedback.
-
Hi @chrjsorg , I've implemented groupnotifications in V8. Can you test it? Change your pubspec.yaml to:
There are a few minor changes with the V8 release (some breaking) so you may need to make minor modifications to your app - see the CHANGELOG - but those will be required for the V8 release anyway (groupnotifications won't make it into V7). See here for how to configure a notification that groups tasks. Let me know what you think. |
Beta Was this translation helpful? Give feedback.
-
Hey man, thank you very much! :) Looks good to me. Do you have an ETA for v8.0? |
Beta Was this translation helpful? Give feedback.
-
Included in V8.0.0, just published |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
Currently it is not possible(?) to display a notification for multiple tasks. Either there is a notification for each task or none at all.
If you download multiple files via
.downloadBatch
, you will end up seeing something like this:https://i.ibb.co/ZNVRbCR/Screenshot-1698060482.png
Describe the solution you'd like
It would be nice to be able to combine multiple tasks into one notification. Ideally, the progress would be calculated automatically and displayed accordingly.
For running downloads it might be..
running: "Downloading multiple files..."
Beta Was this translation helpful? Give feedback.
All reactions