Kotlin Flows & Channels Introduction | Android | CheezyCode - Hindi
HTML-код
- Опубликовано: 11 сен 2024
- Kotlin Flow Tutorial - In this video, we will learn about what is Kotlin Flow? What is channel in Kotlin? We will understand - what are streams and how to implement them in Kotlin. Learn what is the need of streams, what are suspend functions and coroutines in Kotlin with simple example.
Coroutines Suspend functions work great when we have no or single output. But for scenarios where we have streams of data, we need to have some mechanism to implement that behavior. For this we have Kotlin Channels and Flows. Channels are hot whereas Flows are mostly cold. Hot stream is one where producers keeps producing data even if there are no consumers. Cold stream produces data only where there is at least one consumer available to consume the data.
Learn by creating a simple example in Hindi.
Topics covered -
1. Coroutines and Suspend
2. What are streams? How to implement Streams in Kotlin
3. Channels and Flows with Simple Example
4. Hot and Cold Streams.
5. Channels vs Flows in Kotlin
Kotlin Flows Playlist -
• Kotlin Flows Tutorials
Jetpack Paging Tutorial -
• Android Paging 3 | Jet...
Complete Dependency Injection Playlist Link -
• Dagger 2 - Dependency ...
Complete Android Architecture Components Playlist -
• Android Architecture C...
Beginner series in Android Playlist (Hindi) -
• Android Tutorials Step...
Kotlin Beginners Tutorial Series -
• Kotlin Beginner Tutori...
For more info - visit the below link
www.cheezycode.com
We are social. Follow us at -
Facebook - / cheezycode
Twitter - / cheezycode
Instagram - / cheezycode
This channel not only viewed by freshers but also by experienced working professionals. Your content is very good, easy to understand and you have best teaching skills. Your efforts are highly appreciated. I have learned lot of things from you, thanks a lot Cheezy Code! for for that😊. Podcasts are also great way of learning from the industry. Keep up the good work.💯
Thanks a ton
Agree
Agree with Vaibhav sir!
You are the only person who can perfectly teach the SOLID principals with real examples.
😁 sab real life hai - code bhi real life ko automate karne ke liye he likh rahe hai....
@@CheezyCode hehe 😆 I mean with coding example
Bilkul bro...ye plan mei hai...design patterns aur solid principles...dono cover karne ka mann hai
@@CheezyCode that's great, I appreciate your hard work, and I'll watch your all videos. BTW your Coroutines course is superb. Stay blessed Bro.
Rightly said 😅
Came here to see just one video and now watching each and every videos of android. The best channel for beginners to learn android development using kotlin.
Thanks Googly
I'm learning Android App Development & these videos are super useful. Thanks, man!
Wow! Just extraordinary. The way you explained hot and cold streams by comparing them to Theatre and Netflix is just marvellous Please continue the good work that you do 🙏🔥
Just wow! Well done! You explained every part of the tutorial in very simple words. Thank you so much for sharing your knowledge with us. Keep it up :)
Back again! Thanks bro for making such awesome content for the fellow developers. Started watching the playlist yesterday, and currently done with upto 3rd video about Terminal, Non-Terminal operators.
Really good series, keep going man.
Thank you for making this.
my everGreen 1st preference *Cheezy code* whenever watned to understand kotlin / android topic
Great series.
Would love to see it in MVVM architecture
yes...after this...
Great sir. The explanation is very nice and easy to understand for everyone.
Thanks and welcome
It's really valuable for experience professionals also.
this channel guarantees that u will understand the topic completely
Thank you 😃
Exactly what i neeeded. Please do more practical videos on flow
sure
The best part is the rap in the last : )
video ky last me song apki voice me😋 me to everytime sunta hun
Thank you ❤️. U r great. Thank you for your efforts.
Welcome 😊
Thank you...much needed!
🤘
Great sir will enjoy this series also bring here MVI , compose also
🤘
well explained..
Nice explained. Please live streaming wali example implement krain next video me.
🤘
Thanks for this Series Sir ji 🤩
♥
very nice and well explanation. thank you
Thank you 🤘
Quality Video
Thanka sir for beautiful series
🤘
Great :)
thanks for doing hard work for us, but plzzzzzzzzzzzzzzzzzzzzzzz sir wapis kab ayn gye ap 😥😥😥😥😥😥😥8 month sy koi update nahi😥😥😥😥😥😟😟😟😟😟😟😟
Bestam best
which keyboard do you use? It sounds nice.
Sarcasm ?? 😁
Thank you so much
Thank you 🧡
Thank you so sir i had one doubts
If i have chat screen which continues Update data for (Sender) and Receiver.
Do i need to use flow to show Updated results on screen ?
Yes better use case yehi h streams ka...
I want to create an audio player. So do I need to use hot or cold flow for UI updating?
I was thinking, that my music will play in the background when UI is in idle mode... but the player producing data though UI is not receiving the data. So by this thinking, I make a decision that I can produce hot flow from the media player.. and when my UI is in the active state it will receive the flow data and update the UI. So the question is my thinking is right or wrong? or can I use cold flow for this purpose?
Hot flows in this case
❤
Hi sir, which one should we prefer to use, rx java or kotlin flow?
Depends
❤️ed it
Thanks Aravind
Any information when the jetpack compose series will start ?
Soon...but thoda prep work required hai
Can you make a total playlist for beginners for Android studio+kotlin.
Soon
Wow
oh yeah...🤘
What is the use of suspend functions added in kotlin if the response will be received after full execution of the suspend block?
Thread block nahi hota...computation wahi pe suspend hojati hai...
@@CheezyCode Can we say that, what multiple suspend function can do by suspending coroutines, we can achieve same by using Flows/Channels?
For instance - we can get result from different suspend functions by suspending coroutines and getting result into particular job.
yes or no....isme ek sequence bhi h data ke beech mei - matlab - pehle 1 aayega fir 2 aayega fir 3 and so on....iss sequence ko barkaraar rakhna hai....I can run multiple suspend functions to get the data but sequence maintain karna bhari padega...ussi cheez ke liye streams hai....
E.g. se samjhe toh - video play ho rahi h - usme we have to maintain the sequence of data. Multiple suspend function run karke data aajyega but sequence maintain karna bhari padega...hope isse clear hoga
How coroutine get to know this is IO operation technically ?
Hum btate hai by marking it as suspend function
Ap ki USA ke journey pe video banao
bro wapis aagaye - tabhi ka set hai linkedin pe....
@@CheezyCode ok ok
🥰🥰🥰🥰🥰🥰🥰
👍
Thank you Lucky 🤘
Concept is so easy.
Khali khali ghabra rahe the flow se 😂
abhi toh shuru hua - thoda complex bhi hoga aage....😁
So is it analogous to Sockets in case of web dev ?
Not analogous but to consume websockets data in android we can use Flows...
🙏🥺👏👏👏👏👏👏💖
Series on Rx java please
yes..already in plan
Sir channel bhi pura complete kr do
use nahi hoga...
@@CheezyCode sir ji bhut confused hu bata dena.. maine use kr hi lunga kahi na kahi😅😅
why is the title in english?
Because programming language has words that are in English. People search using these words.