MaikuB / flutter_local_notifications

A Flutter plugin for displaying local notifications on Android, iOS, macOS and Linux
2.47k stars 1.4k forks source link

Feature request: Adding a way to update sticky notification text without stopping and restarting that notification #2407

Open leaf-node opened 1 month ago

leaf-node commented 1 month ago

stopForegroundService and startForegroundService can be used to update the text in a foreground service (sticky) notification in Android. However, that OS is slow to show newly created foreground services notifications (Maybe 10 - 20 seconds at times). It would be great if there were a way to change the title and body text without removing the current sticky notification.

I tried using second invocation of startForegroundService after the first invocation created the sticky notification, but that did not change the text.

MaikuB commented 1 month ago

Could you help look into and submit a PR on this? Support for foreground service notifications was a contribution from the community that started with https://github.com/MaikuB/flutter_local_notifications/pulls?q=is%3Apr+is%3Aclosed+foreground

leaf-node commented 1 month ago

I'm not sure when, but I'll take a look and see what I can do.