I have emit exception inside flow and got below exception. OptionSelectedCountUsecase.kt Repository.kt RepositoryImpl.kt ApiService.k ...
I have emit exception inside flow and got below exception. OptionSelectedCountUsecase.kt Repository.kt RepositoryImpl.kt ApiService.k ...
Consider the following code: How can I let coroutine 2 wait until the subscription to the SharedFlow in coroutine 1 is set up? ...
I am trying to get some knowledge in reactive programming and working with flows, so I took a method out of my contact class and tried to rewrite it a ...
I am a little bit confused. I am trying to implement pagination 3 library. When I working on it I figured something out. If I use pagedItems() method ...
I'm building a Clean Architecture MVVM app with Jetpack Compose and currently busy with the log in screen. I'll add relevant code snippets below but j ...
I have a view model that gets search query data string every time a user enter a text in my text field in the Top App Bar. The view model is as follo ...
Is there any way how can I wait for data from Flow and then for example log it? I have problem that code will run asynchrounously, Log.d is fired befo ...
I need to have a state in a ViewModel which gets updated by collecting from flows. my State class: Each property should be set from a flow. The flo ...
I have this basic flow emit / collect code but collect is not receiving any emits. ...
When I collect a StateFlow in an Activity/Fragment using repeatOnLifecycle and then navigate to another activity then go back to the base one then the ...
When I collect a StateFlow's value in repeatOnLifecycle, I have to navigate to other fragment and back then can collect the value's change. But not on ...
Recently, I decided to learn a bit about how to write android apps. After read book and checked many codes, blogs etc. I prepared small code which sho ...
I have a following problem: there are two types of events: These events are sent to val eventsFlow = SharedFlow<Event> (or channel), where la ...
I'm currently learning Kotlin flow operators on Android and want to make a network request or a DB operation, followed by parallel requests and wait u ...
I have 2 flows. First flow updates every 50ms. I have the second flow which is equal to first flow but i want it to produce latest value from original ...
I have a local database in my Android app. There is a function that takes some data from server and updates local database. When this function is runn ...
I am trying to build a simple multithreaded processing application that interacts with a messaging API. Currently, I have abstracted this API into a f ...
I tried to combine several SharedFlow into one StateFlow using stateIn. But my StateFlow seems not updating after I emit new value to it's SharedFlow ...
In the following code, which shows two different public uiState handler, uiState1 and uiState, what is the difference between the two scenarios? // U ...
Earlier, I have used this function: But due to some constraints that are explained here I had to use: Which is what I need, but I cannot find aw ...