-
Notifications
You must be signed in to change notification settings - Fork 143
Closed
Description
- Open the app and start the task handler.
- Close the app (i.e. hit app switcher and swipe app away).
- Observe the isolate is still running and handling
onEvent
. - Open the app via the notification button and observe that the related
receivePort
that was previously stored in memory is nownull
. - Now there is no way to connect a
ReceivePort
to the isolate that is still running. You can callFlutterForegroundTask.restartService
to get a new receive port, but this destroys your task handler which causes you to lose all the state you've accumulated in it.
If the isolate is lost once the app is stopped, then is there any point in still keeping it running? Or should I be constantly writing to shared preferences so that I can resume?
Metadata
Metadata
Assignees
Labels
No labels