fluttercommunity / flutter_workmanager

A Flutter plugin which allows you to execute code in the background on Android and iOS.
851 stars 260 forks source link

[question] how to make background process long lived? #485

Closed agufagit closed 1 year ago

agufagit commented 1 year ago

I'm making a background notification process using workmanager with a websocket connection. It looks to me that workmanager background process just stops after return Future.value(true); and closes websocket connection. Is there anyway to make it long lived?

Thank you

xunreal75 commented 1 year ago

No because isolated , it’s not possible to let websocket living. Furthermore it would decrease the battery level which is only allowed on special apps like music or navigation.