CamilleBC
09/27/2018, 10:22 AMrobin
09/27/2018, 10:30 AMUI
to confine a coroutine to run on that:
launch(Main) {
// Do UI bound stuff
}
CamilleBC
09/27/2018, 10:57 AMClassifier 'UI' does not have a companion object, and thus must be initialized here
A quick Google search doesn't bring the answer ^^robin
09/27/2018, 10:58 AMMain
, not UI
, my bad!org.jetbrains.kotlinx:kotlinx-coroutines-android
in your project.CamilleBC
09/27/2018, 12:09 PMDispatchers.Main
dispatcher for my coroutineContext.
Now my taks is asynchronous, though single threaded (but I don't really care about that). That means everything runs in the main thread!
Cheers and thanks for the help! (I am updating the gist at the same time for those who want to see or comment what I have done with robin's help)robin
09/27/2018, 12:18 PMCamilleBC
09/27/2018, 12:33 PMrobin
09/27/2018, 12:35 PMCamilleBC
09/27/2018, 12:57 PMrobin
09/27/2018, 1:02 PMSam
09/27/2018, 1:20 PMCamilleBC
09/27/2018, 1:25 PM