I'm reading Kotlin Coroutine and know that it is based on suspend function. But what does suspend mean? Coroutine or function gets suspended? From https://kotli
Recently, the class StateFlow was introduced as part of Kotlin coroutines. I'm currently trying it and encountered an issue while trying to unit test my ViewMod
Recently, the class StateFlow was introduced as part of Kotlin coroutines. I'm currently trying it and encountered an issue while trying to unit test my ViewMod
Recently I've updated my ViewModel to use new viewModelScope. From its implementation, I see that Dispatchers.Main.immediate is set as the default CoroutineDisp
Recently I've updated my ViewModel to use new viewModelScope. From its implementation, I see that Dispatchers.Main.immediate is set as the default CoroutineDisp
I am getting a compilation error that I have described below. I have tried different solution provided on similar question like mine but neither of them worked
Google is deprecating Android AsyncTask API in Android 11 and suggesting to use java.util.concurrent instead. you can check out the commit here * * @deprecate
I was following the tutorial from https://proandroiddev.com/suspend-what-youre-doing-retrofit-has-now-coroutines-support-c65bd09ba067. I am having difficulty t
I am using Room and implemented Dao that returns LiveData. It was working fine with below dependency added. implementation "androidx.room:room-runtime:2.1.0-al
I have ViewModel with Kotlin sealed class to provide different states for UI. Also, I use androidx.compose.runtime.State object to notify UI about changes in st
I've been trying to use khttp to send an .jpg file in an android activity but haven't been able to make it work. fun sendImage(view: View) { try {
I'm trying to trigger an update on LiveData from a coroutine: object AddressList: MutableLiveData<List<Address>>() fun getAddressesLiveData(): Live
I am trying to use Kotlin coroutines to perform multiple HTTP calls concurrently, rather than one at a time, but I would like to avoid making all of the calls c
Short requirement: have ability to create corotine context, which will executed in the single thread only (e.g. without parallelism). Additional requirement: i
fun returnValue(): Int { viewModelScope.launch { return 1 // Something like this } } I want to return some value in a viewModelScope like the