flutter_workmanager icon indicating copy to clipboard operation
flutter_workmanager copied to clipboard

Feature request - Support for long-running workers using WorkManager foreground service

Open absar opened this issue 4 years ago • 5 comments

I would like to add a feature request to support long-running workers using WorkManager foreground service, the same way Android WorkManager 2.3.0-alpha02+ is doing now e.g. running as a foreground service and showing notification, quoting below from the link provided at the end, this will help many developers who want to develop purely in Dart without using Native code or manual inter Isolate messaging, while there might be other solutions, having it in WorkManager will make it in sync with Android WorkManager:

WorkManager 2.3.0-alpha02 adds first-class support for long running workers. In such cases, WorkManager can provide a signal to the OS that the process should be kept alive if possible while this work is executing. These Workers can run longer than 10 minutes. Example use-cases for this new feature include bulk uploads or downloads (that cannot be chunked), crunching on an ML model locally, or a task that's important to the user of the app. Under the hood, WorkManager manages and runs a foreground service on your behalf to execute the WorkRequest, while also showing a configurable notification.

https://developer.android.com/topic/libraries/architecture/workmanager/advanced/long-running

Sorry for the label, can someone remove the bug label, I seem to have missed the open to create blank issue

absar avatar Dec 26 '20 02:12 absar

@absar Great idea. Do you think work manager should get a dedicated API to maintain the foreground service (notification) or should it handle everything transparently in the background.

ened avatar Apr 12 '21 21:04 ened

As a package user it doesn't matter to us too much with a dedicated API or within the existing one, you can plan it as per your defined best practices

absar avatar Apr 13 '21 12:04 absar

Upvoting this. It'd be a great addition to the package.

melvinkcx avatar Jan 09 '23 03:01 melvinkcx

Any news regarding this feature?

dayron9110 avatar May 28 '23 15:05 dayron9110

Any update on this please?

narengoku avatar Jun 04 '23 20:06 narengoku