dave08
12/10/2019, 1:38 PMIntentService
using Coroutines and built on top of a LifecycleService
?Adam Powell
12/10/2019, 2:18 PMdave08
12/10/2019, 2:22 PMjust use coroutines on their ownDoes that mean using a
LifecycleService
with runBlocking { }
? And how would I queue the Intents coming in?use WorkManager's CoroutineWorkerI need this to run right away, will WorkManager do that, or does it just schedule things for when it decides to run them?
Adam Powell
12/10/2019, 2:24 PMdave08
12/10/2019, 2:26 PMAdam Powell
12/10/2019, 2:34 PMlaunch
what you need to, or send queued messages to an actor, or whatever makes sense. All the service stuff does on Android is provide a signal to the OS that your app is still doing work, and as of Oreo your ability to use services to send that signal is severely limited.dave08
12/10/2019, 2:37 PMAdam Powell
12/10/2019, 2:45 PMCoroutineWorker
the lifecycle to think about is usual coroutine cancellationdave08
12/10/2019, 2:55 PMwithContext(NonCancellable) { }
or similar
Thanks for clarifiying things 😉!