flutter_workmanager
flutter_workmanager copied to clipboard
Feature request - Support for long-running workers using WorkManager foreground service
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 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.
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
Upvoting this. It'd be a great addition to the package.
Any news regarding this feature?
Any update on this please?