Since flow are executed in the same context we called collect from, the video example fetches the latest news on the main thread. In-order to transfer fetch the latest news to the worker/IO thread we can make use of flowOn() intermediate operator. For details please check out the Android docs on Kotlin Flow (section - Executing in different coroutine context)
This is a very good explanation, the LiveData and Flow codelab was challenging for me and this just cleared up all the frustration I was having using Flow, gracias!!
Great video, I didn't understand the firebase part in the doc but in this video, I know now what it is, and also it is a good idea to explain the same code in video and doc, Keep up the good work!
Since flows can be active over a long period of time, does that mean that they should be called from the IO dispatcher? ie. In the first example, there is a while loop in the flow. Would that result in useless work being done / a coroutine being active when it's not needed for most of the time?
Flow is pretty cool, but I find it quite difficult to manage coroutine contexts when making Flow into a StateFlow -- and unsure what the heck is going on. It would be nice to get some easy-to-understand resources about this.
Nice, but audio quality should be better
Agreed. A small t-shirt microphone would make a great change.
We need an official google's opinion on replacing livedata with stateflow. Please.
@@sevarbg83 They have already added databinding support for Stateflow in canary version.
Yes its hard to catch up sometime
@@Mike-er2ihA giant t-shirt microphone could also work well though.
Rewrote the entire application to use flow and greatly improved performance. Great video.
Since flow are executed in the same context we called collect from, the video example fetches the latest news on the main thread. In-order to transfer fetch the latest news to the worker/IO thread we can make use of flowOn() intermediate operator.
For details please check out the Android docs on Kotlin Flow (section - Executing in different coroutine context)
Thanks, Manuel. Now I can go with the flow as Queen of the Stone Age does.
This is a very good explanation, the LiveData and Flow codelab was challenging for me and this just cleared up all the frustration I was having using Flow, gracias!!
Thx Google. Whats the defference to LiveData?
Good explanation 👏
Duration of video: 13:37 :)
Great talk, It would be awesome if you also make a video about Stateflow
In 4:36 should be while(isActive) to stop emitting when the coroutine scope is cancelled?
Great video, I didn't understand the firebase part in the doc but in this video, I know now what it is, and also it is a good idea to explain the same code in video and doc, Keep up the good work!
Doesn't this use case of making requests in fixed intervals fall under a WorkManager?
Since flows can be active over a long period of time, does that mean that they should be called from the IO dispatcher? ie. In the first example, there is a while loop in the flow. Would that result in useless work being done / a coroutine being active when it's not needed for most of the time?
Flow is pretty cool, but I find it quite difficult to manage coroutine contexts when making Flow into a StateFlow -- and unsure what the heck is going on. It would be nice to get some easy-to-understand resources about this.
Great explanation with lots of relatable examples!!! Replacing LiveData with Flow in my side project haha
Consider trying .asLiveData() when consuming a Flow, this way you get the added benefits of LiveData together with Flows
So flow is a stream of data in which we can emit new data. Cool
Nice, Now waiting for the state and shared flow video ...
How about integration with jetpack compose? Is there any?
@Artem Zanin this question was marked as a duplicate just kiddin
can I ask u what tool u are using to make this great presentations !?
Thanks for the explanation Manuel !
Why does it feel like they removed callback hell using suspend functions and then added it right back using callbackFlow,
CallbackFlow is still under "ExperimentalCoroutinesApi" right ?, any ideas on when it would be promoted to completely stable ?
Great video, thank you
Wow! Flow is very amazing!
Good guide
Amazing, I'm replacing RxJava in our current project with Flows.
this was helpful.
great video!!!
well delivered Manuel! :)
Not able to catch your Flow
Good
Thanks.
Awwwwwesome!!!! clapclapclapclapclapclapclapclap
So the Flow is another LiveData...
It's better than LiveData because it can hold more than 1 value
@Artem Zanin *Flowable 😁
@Artem Zanin pls no
@@codinginflow We will wait for another playlist of your channel for using Flow in a sample app 😄
@@codinginflow so basically LiveData on steroids??