So I created MVVM app in kotlin to fetch movies from TMDB api, using injections and coroutines. My problem is that I cannot copy the list of returned movies int
I'm having a issue uploading a file to Google Drive. W/System.err: java.io.FileNotFoundException: /storage/emulated/0/Android/data/dev/files/backup/https:/i.pic
Suppose we have a CoroutineScope and we launched several coroutines from it via launch. Then we do CoroutineScope.cancel(). And then we need to wait until cance
i'm try to write test for my viewModel function with coroutines. When request is success -> the data is sent to LiveData. If the request fails -> it is re
I query records and return them as Flow<List<RecordEntity>> with Room. I run code A, and get result A as I expected. I hope to display a Loading UI
I am new to the coroutine concept. I'm not very confident in the code I've written. Basically I have a queue of user events that I send to my server. Adding an
Im trying to test this suspend function: suspend fun <T> getResult(call: suspend () -> Response<T>): Resource<T> { val response = call()
My existing Android code uses AsyncTask to continuously poll data from a virtual COM port and dumps data to UI thread by overriding the onProgressUpdate() funct
So, I'm trying to collect data from flows in my Foreground service (LifecycleService) in onCreate(), but after the first callback, it is not giving new data. Th
I'm using Retrofit with Coroutine using this structure to hit the API requests in my app but at some screens I send multiple request and I want to only show dat
I'm trying to test this repository using a unit test with JUnit 4 class AppRepository @Inject constructor( private val networkHelper: NetworkHelper, pri
I am currently debugging a performance issue (see here) which I could reduce to a code snippet that uses multiple async{} calls in a coroutine. I am delaying by
I have a code it's work fine in debug mode also generated signed APK will work fine if isMinifyEnabled=false but for generated signed APK when isMinifyEnabled=t
I refer to the official Android documentation on using the Flow library in the recommended app architecture. In the UserRepository class: class UserRepository @
I have a flow to fetch data from database via content provider. fun getDataFlow(): Flow<Result> { return flow { emit(Result.Loading) // f
I am doing a db get operation for my cart page which has multiple tables. I have mapper class which has all the relations with all the tables. I have used corou
This is my code in adapter using recyclerView. How to improve this code to not use Main Scope, but to use scope that could be disposal? I need to have access to
Context In Jetpack compose, we have the option of using rememberCoroutineScope() as well as using the LaunchedEffect composable in order to use coroutines / run
I am trying to write tests for my Repository which provides access to my Room database. For this, I wrote a Mock Database and a mock DAO: My Database: abstract
I am using MutableStateFlow. My flow type is sealed class with different states (Loading, Success, Error, etc). Initial value of my flow is empty: private val _