No video

Flow Basics - The Ultimate Guide to Kotlin Flows (Part 1)

  Рет қаралды 130,720

Philipp Lackner

Philipp Lackner

Күн бұрын

In this guide you will learn everything you need about Kotlin Flows in your everyday life as Android developer.
⭐ Get certificates for your future job
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:
pl-coding.com/...
💻 Let me personally review your code and provide individual feedback, so it won't backfire and cost you a fortune in future:
elopage.com/s/...
Subscribe to my newsletter for regular Android, Kotlin & Architecture advice!
pl-coding.com/...
Join this channel to get access to perks:
/ @philipplackner
Regular live codings on Twitch:
/ philipplackner
Join my Discord server:
/ discord
Regular programming advice on my Instagram page: / _philipplackner_
Checkout my GitHub: github.com/phi...
You like my free content? Here you can buy me a coffee:
www.buymeacoff...

Пікірлер: 139
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Would you also like me to make a video about unit testing flows?
@eternussolutions1084
@eternussolutions1084 2 жыл бұрын
@Philipp Lackner your videos are out of the world! Its really Helpful.. Thanks! Yes would Love to see the unit testing flows
@czerewacz
@czerewacz 2 жыл бұрын
Yes please Philipp! ❤️🙏🏻
@raghavaggarwal8644
@raghavaggarwal8644 2 жыл бұрын
Yes yes
@charlybrugere741
@charlybrugere741 2 жыл бұрын
Yes that would really be helpful
@daniilvladimirov2457
@daniilvladimirov2457 2 жыл бұрын
Yes please
@USS_Daedalus
@USS_Daedalus 2 жыл бұрын
From i know is Philipp only one of the best Native Android Devs who make Up to Date Tutorials and that with Kotlin. So underrated.
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Thanks bro!!
@cansuyeksanaktas
@cansuyeksanaktas 2 жыл бұрын
I would like to say thank you for not only giving these great courses for free but also for your courses helping me to overcome the Imposter syndrome. When I watch your videos, I feel I can learn the topic. I appreciate that you are so positive and professional. Thank you so much!
@ahmedel-hady3249
@ahmedel-hady3249 2 жыл бұрын
I already know this playlist will be fire 🔥🔥🔥🔥
@a2ashraf
@a2ashraf 2 жыл бұрын
Hell yes!
@jatinvashisht4293
@jatinvashisht4293 2 жыл бұрын
I don't see any other android youtuber providing this level of content
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Thanks a lot man!!
@Berk45632
@Berk45632 2 жыл бұрын
You are not the Teacher we want. You are the Teacher we need! 💖💖💖
@johndoe5420
@johndoe5420 2 жыл бұрын
Great introductory video, can't wait for the next! I like how you keep these videos chill but informative. You have been helping me a lot with my undergraduate thesis. Love from Greece
@thomaswaldorf2829
@thomaswaldorf2829 2 жыл бұрын
I guessed that this was how it worked, but it was real good to see it explained as plainly as you did. Thank you!
@jorgearturorodriguez9432
@jorgearturorodriguez9432 2 жыл бұрын
As always, well explained and quality content!
@jaygitonga2026
@jaygitonga2026 2 жыл бұрын
Another great video Phillip keep up the good work , can't wait for part 2
@LikeFactoryMade
@LikeFactoryMade 6 ай бұрын
Thank you for making these videos, they really help me better understand things.
@mohammad-hossein-farzanegan
@mohammad-hossein-farzanegan 5 ай бұрын
best start for learn Flows.. Thanks philipp
@andreyterehin9188
@andreyterehin9188 2 жыл бұрын
Philipp! You're amazing ! I'm jumping from video to video because what you are explaining is very interesting for me at this time - all the topics! Thank you very much! And thanks for your clear English - I'm Russian but there is no difficulties to understand you
@tanjimahmed213
@tanjimahmed213 2 жыл бұрын
Thanks, Phillip it's really helpful
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Glad it was helpful!
@gokuldas027
@gokuldas027 2 жыл бұрын
Much needed lesson, Thank you.. Can you include a video comparing LiveData and Flow, in a developer perspective about implementations. Edited
@mouzinu
@mouzinu 2 жыл бұрын
He's already done that. You can find it searching "StateFlow vs. Flow vs. SharedFlow vs. LiveData" on his channel
@gokuldas027
@gokuldas027 2 жыл бұрын
@@mouzinu Oh great, I missed that..
@AbolfazlKalemati
@AbolfazlKalemati 4 ай бұрын
Have a great explantion about the concept of Flow.
@jopadjr
@jopadjr 2 жыл бұрын
1.3K+...Thanks Philipp... I went back to your KZfaq account because I know your explanation is very easy to understand than the one I was having in Udemy
@buddaset4226
@buddaset4226 2 жыл бұрын
I don't know a very good English, but I understood that you explain in this video. Thanks!
@souhailab6082
@souhailab6082 9 күн бұрын
Great video !🙏
@dewetvanrooyen8458
@dewetvanrooyen8458 5 ай бұрын
Great , thanks now it make sense.
@damercy
@damercy 2 жыл бұрын
Let's goooo! Thank you so much for this playlist!
@PhilippLackner
@PhilippLackner 2 жыл бұрын
You're welcome!!
@this-is-bioman
@this-is-bioman 9 ай бұрын
How can you be notified about anything with flows when the documentation states that flows are cold: > Flows are cold streams similar to sequences - the code inside a flow builder does not run until the flow is collected. at 11:45: you say that the block is triggered when `emit` is called, but it the other way around!
@DrAboElfotoh
@DrAboElfotoh Жыл бұрын
you always save me, keep up. Thanks Philipp 🙏
@kaizen960
@kaizen960 Ай бұрын
Great video!
@ahmedzain3416
@ahmedzain3416 2 жыл бұрын
As long we have the flow started values by 10 inside the view model, why did we give .collectAstate(10) an initial value of 10 here?
@avadhutredekar
@avadhutredekar 25 күн бұрын
+1 to that
@avadhutredekar
@avadhutredekar 25 күн бұрын
I think we are setting initial value as 10 for the UI to show even before the actual flow starts to emit the values.
@bjugdbjk
@bjugdbjk 2 жыл бұрын
Great way of explanation on collect and colectLatest ...thanks man !!
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Glad it was helpful!
@a2ashraf
@a2ashraf 2 жыл бұрын
Hope there will be unit tests for flows as well…it’s different…you can’t collect due to dispatcher mess…you need to test as a list…
@arch10
@arch10 2 жыл бұрын
Great video. Waiting for the next video in the playlist. 😄😄
@venkatesh4307
@venkatesh4307 2 жыл бұрын
It's a most desirable concept. I think flows will play crucial role in KMM.
@PhilippLackner
@PhilippLackner 2 жыл бұрын
They will!
@CitizenWarwick
@CitizenWarwick 2 жыл бұрын
Thank you Philipp! nicely explained
@varunjohnjohn
@varunjohnjohn Жыл бұрын
Thanks bro
@siarheisudakou4455
@siarheisudakou4455 2 жыл бұрын
Excellent lesson! Thanks a lot!
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Glad you liked it!
@nksaroj
@nksaroj 2 жыл бұрын
Great content mate
@user-uu8rn6wf4u
@user-uu8rn6wf4u Жыл бұрын
Awesome! Thank you! 🔥🔥🔥♥♥♥
@ekoprasetyo3999
@ekoprasetyo3999 2 жыл бұрын
What do you think about RxJava, RxKotlin, or RxAndroid philipp?
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Haven't used RxKotlin or RxAndroid. RxJava is a great library, but I prefer flows because of coroutines
@muhannddh
@muhannddh 2 жыл бұрын
First of all, thank you so much for these amazing tutorials, Could you please also in the future include some Gradle tutorials
@user-te8um6ox9p
@user-te8um6ox9p 2 жыл бұрын
Philipp, your content is the greatest! Why do you do an overview of new technology only? Many projects were created on Rx. Please make a comparison of this tool)
@xavier4107
@xavier4107 9 ай бұрын
Nice content. And also can you make more tutorials on Android with xml.
@AlexCouch65
@AlexCouch65 2 жыл бұрын
Flow has changed quite a bit since i last used it a couple years ago. I don't remember SharedFlow and StateFlow being there (or maybe i wasn't aware at the time) but i read the docs a lot while using it so i don't think i missed it
@nomadicamit2523
@nomadicamit2523 28 күн бұрын
Amazing
@ondrejhoos142
@ondrejhoos142 2 жыл бұрын
Great, thank you!
@irsathkareem7513
@irsathkareem7513 2 жыл бұрын
Phillip, most awaited playlist, good luck, but we need more from you, will u made exoplayer customization playlist???? Please
@muhsinakdogan2667
@muhsinakdogan2667 11 ай бұрын
which keyboard are you using? The sound of your keyboard is coming out so professional and I liked it :) share a link please :)
@iftak01
@iftak01 2 жыл бұрын
was learning it today again lol
@kursuspintar
@kursuspintar Жыл бұрын
Very helpful
@androidpc9656
@androidpc9656 Жыл бұрын
Thanks really usefull
@GeminiVS
@GeminiVS 7 ай бұрын
I'm not sure if this still working fine in 2024. I try to do everything following what you're teaching but my code just get many red color on it. starting at setContent { KotlinFlowsTheme { and many red words after that. All of it seem to be "Unsolved reference" problem class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { KotlinFlowsTheme { val viewModel = viewModels() val time = viewModel.countDownFlow.collectAsState(initial = 10) Box(modifier = Modifier.fillMaxSize()) { Text( text = time.toString(), fontSize = 30.sp, modifier = modifier.align(Alignment.Center) ) } } } } }
@nguyenthanhcong8613
@nguyenthanhcong8613 5 ай бұрын
Here: text= time.toString() Replace: text = time.value.toString()
@GeminiVS
@GeminiVS 5 ай бұрын
​@@nguyenthanhcong8613 thanks, it's my bad I just create empty activity while I should create compose empty activity 🤣😂
@PandaTop.
@PandaTop. 2 жыл бұрын
Hello. Record Please Lessons on Services, Broadcast Receivers, Content Providers.
@kenanhas9404
@kenanhas9404 8 ай бұрын
Hello Philip. I was working with xml. When I tried the code in this lesson, when I turned the screen sideways, it started counting down from 10 again. I wonder if flow is not lifecycle aware like livedata?
@haoqian1465
@haoqian1465 2 жыл бұрын
very helpful!
@nghiango5137
@nghiango5137 2 жыл бұрын
Hi, Philipp Lackner Which dependency injection should we learn? Hilt, dagger 2, koin,...
@GriNAME
@GriNAME 2 жыл бұрын
Thank you!
@PhilippLackner
@PhilippLackner 2 жыл бұрын
You're welcome!
@NimaAzh
@NimaAzh 2 жыл бұрын
thanks for your great videos. I used this. I wanted to reset it after it was 0 . I put it in Job(Coroutine) . in special condition I canceled the job. then try to call collect function again . but something weird happened. countdown timer digit was reset and was subtracted like 2 at a time instead of 1. it is like collect function is called two times and it is faster than usual to near 0.
@renzcarlosalanga6077
@renzcarlosalanga6077 2 жыл бұрын
Dude your awesome
@rabaka7899
@rabaka7899 2 жыл бұрын
Really helpful
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Glad it helped
@omidphoenix4883
@omidphoenix4883 2 жыл бұрын
I learned the coroutines from your channel, I knew about flows but still it was a good refreshment. Would you make a playlist about ktor and making backend server for apps to?
@PhilippLackner
@PhilippLackner 2 жыл бұрын
I got 2 very detailed courses on my website about that: pl-coding.com/premium-courses
@mojtabashirkhani643
@mojtabashirkhani643 Жыл бұрын
Can you explain about delay function, collectLatest operator just work as we expected when the time of delay function inside collectFlow() function is bigger than the delay function in countDownValue
@videosforbasit
@videosforbasit 2 жыл бұрын
Can I convert the type of Flow that is returned by Room DB. Let's say I have a Flow that is returned by Room now I want to create a new Flow with type of Flow in my repository class. Is this possible?
@bjugdbjk
@bjugdbjk 2 жыл бұрын
Great playlist man !! Do cover flatMap nd flatMapMerge nd flatMapConcat operators , Theese are pretty confusing !!
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Coming in the next one 👍
@go_better
@go_better 2 жыл бұрын
Is it possible to have like parametrized flow collections? Or flows are bound to only one..like..value? Say I have some parametrized fragment and I want to receive data, based on this parameter. Sooo...technically, I can use a ViewModel, but sheesh I will need to refresh my VM understanding. Will that VM be fragment scoped or singleton? I will look up in your videos an explanation of ViewModel. Because you make subjects so much easier!
@androiddev7267
@androiddev7267 2 жыл бұрын
can we use kotlin flows without jetpack compose?
@patrakarpopatlaltoofanexpr3258
@patrakarpopatlaltoofanexpr3258 2 жыл бұрын
Just noticed you are from Germany ,which uses British english, but you said zeee (while pronouncing z) - which is American English, lol :)
@adbysantos6603
@adbysantos6603 Жыл бұрын
Would collectLatest fit well for debouncing?
@mrpi230
@mrpi230 2 жыл бұрын
Thank you, can we use flow with services.
@vazhakentchiashvili2198
@vazhakentchiashvili2198 2 жыл бұрын
YAAAAAAAAAAY THANK YOU!
@PhilippLackner
@PhilippLackner 2 жыл бұрын
You're welcome!
@nachiketgomkale5400
@nachiketgomkale5400 2 жыл бұрын
what exactly is emit ??
@Joe-yu9wc
@Joe-yu9wc 2 жыл бұрын
Hi can you please make some contents about livedata->flow? Thank you very much.
@konstantinchernyaev3011
@konstantinchernyaev3011 2 жыл бұрын
3:18 Coroutine with Channel can do this 😶‍🌫️
@rexitspersonal8353
@rexitspersonal8353 2 жыл бұрын
why you collected flow in a coroutine , i did not get the reason
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Collecting a flow is suspending and therefore has to be done in a coroutine
@rexitspersonal8353
@rexitspersonal8353 2 жыл бұрын
@@PhilippLackner thank you so much for replay man
@PhilippLackner
@PhilippLackner 2 жыл бұрын
@@rexitspersonal8353 I recommend to watch my coroutines Playlist first then before jumping into flows
@rexitspersonal8353
@rexitspersonal8353 2 жыл бұрын
@@PhilippLackner one more thing. we also collected flow in main activity as a state . which is not in coroutine
@rexitspersonal8353
@rexitspersonal8353 2 жыл бұрын
@@PhilippLackner yes
@cinnybun739
@cinnybun739 2 жыл бұрын
Dayum!
@imbc7867ghuui9
@imbc7867ghuui9 2 жыл бұрын
You are crazy!
@PhilippLackner
@PhilippLackner 2 жыл бұрын
Thanks!
@Punarjagran
@Punarjagran 2 жыл бұрын
Easy 🌺👌✨☺️🙏
@artsbrand
@artsbrand 2 жыл бұрын
what is that? -> KotlinFlowsTheme
@SAJJADAHMAD-uy3hu
@SAJJADAHMAD-uy3hu Жыл бұрын
Pls make some real use of flow in your project that actually utilize flow rather than mimicking😮 it like video streaming app using flow.
@ManojPedvi
@ManojPedvi 2 жыл бұрын
First view, like and comment :)
@PhilippLackner
@PhilippLackner 2 жыл бұрын
🎉
@hossamqandel5638
@hossamqandel5638 2 жыл бұрын
what i have to do if i am not using compose and i want to show this changes value in textView in Activity? @Philipp Lackner
@jhNic
@jhNic Жыл бұрын
Using implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0" like he did 8:53 val viewModel = viewModel() doesn't work import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import androidx.lifecycle.viewmodel.compose.viewModel class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val viewModel = viewModel() //error } } Please someone help
@jhNic
@jhNic Жыл бұрын
solution: use implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0"
@xCrawfly
@xCrawfly 2 ай бұрын
@@jhNic thanks!
Flow Operators - The Ultimate Guide to Kotlin Flows (Part 2)
25:26
Philipp Lackner
Рет қаралды 59 М.
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 3,2 МЛН
❌Разве такое возможно? #story
01:00
Кэри Найс
Рет қаралды 1,5 МЛН
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 196 МЛН
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 138 МЛН
The Essence of Coroutines
8:10
Dave Leeds
Рет қаралды 9 М.
#7 Kotlin Coroutines Flow. StateFlow. SharedFlow || Курс по корутинам
20:41
Android Broadcast. Все об Андроид разработке
Рет қаралды 28 М.
Kotlin Flows in practice
21:06
Android Developers
Рет қаралды 157 М.
Google Pixel 9/Pro Review: Gimmick or Good?
24:05
Marques Brownlee
Рет қаралды 2,6 МЛН
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 3,2 МЛН