No video

Starting our First Coroutine - Kotlin Coroutines

  Рет қаралды 82,723

Philipp Lackner

Philipp Lackner

Күн бұрын

In this video you will learn how to start a coroutine in Kotlin and how to delay them.
⭐ 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/...
Put these dependencies in your build.gradle (app) file:
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.5'
Regular Android tutorials on my Instagram: / philipplackner_official
Checkout my GitHub: github.com/phi...

Пікірлер: 122
@codinginflow
@codinginflow 4 жыл бұрын
The explanation with the construction workers was genius 👌
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thanks mate 💪
@bboydarknesz
@bboydarknesz 4 жыл бұрын
Waiting from yours, bro..
@mattgraves3709
@mattgraves3709 3 жыл бұрын
I was thinking the same Florian
@kuriyer_tashkent
@kuriyer_tashkent 3 жыл бұрын
good
@akunvalid9447
@akunvalid9447 11 ай бұрын
Rarely have I commented on a video, but this video is awesome
@unnibabu
@unnibabu 4 жыл бұрын
The best video about Coroutine online! No begging for likes or subscribers, just pure knowledge!!... Thank you
@abdoghania2273
@abdoghania2273 4 жыл бұрын
best android development channel on youtube
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thank you so much for your comment ❤️
@christopherteddymienarto9115
@christopherteddymienarto9115 3 жыл бұрын
The explanation with the construction workers was easy to understand, Thanks!
@alvaroisea2259
@alvaroisea2259 4 жыл бұрын
I'm just starting with kotlin and this series is helping me big time, thank you for that man!
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thanks, you're welcome!
@ajaygalagali5963
@ajaygalagali5963 3 жыл бұрын
Thanks! Construction analogy was so good
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Glad it was helpful!
@mattgraves3709
@mattgraves3709 3 жыл бұрын
Returning customer, I love when I find a channel that I can use for a good reference and brother I am flying through this app build thanks to you!! Thank you so much!!
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Thanks for all your comments Matt, glad you enjoy the videos 👍👍
@zhurui1682
@zhurui1682 Жыл бұрын
WONDERFUL explanation about coroutine!!! I was learning the Google Android tutorial about coroutine, but it was very unclear and hard to understand. Luckily I found this video. It was really detailed and clear. Thank you, Phillip!😄
@PhilippLackner
@PhilippLackner Жыл бұрын
Glad it was helpful!
@nrg4285
@nrg4285 11 ай бұрын
Philipp, consider yourself lucky that you don't code in React Native professionally. Android is so nice I can literally go on 3 year old video and the content is not outdated (except for some config). I can reliably follow this tutorial and it will work no problem. I could not imagine following a 3 year old React Native tutorial, article, or StackOverflow issue and it still being relevant or working. I'm jealous.
@yogendrapawar1738
@yogendrapawar1738 Жыл бұрын
clear and on point ... no rubbish talks impressed
@hannanshaikh2616
@hannanshaikh2616 4 жыл бұрын
Awesome, I shifted my development completely to kotlin by following your video, please create more videos on projects
@bharathprakash
@bharathprakash Жыл бұрын
Thank you so much !! Clear Explanation
@AmanKumar-kz1rn
@AmanKumar-kz1rn 3 жыл бұрын
kudos to your explanation this channel really deserves more subscribers
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Thanks a lot!
@Kunal-jp8tn
@Kunal-jp8tn 2 жыл бұрын
Thank you so much for this video.
@janetdias475
@janetdias475 Жыл бұрын
Every bit of your explanation is so crisp and clear😊 Thank you for your efforts🙏🏻
@stephend5305
@stephend5305 4 жыл бұрын
don't know how i find this channel. Very easy to understand Coroutines.
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Nice! Thanks
@jintumonisingha8717
@jintumonisingha8717 Ай бұрын
Such a clear explanation loved it subscribed
@Indently
@Indently 4 жыл бұрын
Super cool!
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thanks!!
@henriquepetters
@henriquepetters 4 жыл бұрын
Dude, your content is what was missing in youtube. Thanks again and please, keep the videos coming. :D
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thank you so much🙏🙏
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Would it be okay for you if I use your comment as a testimonial on my future website?
@henriquepetters
@henriquepetters 4 жыл бұрын
@@PhilippLackner Please, use it.I hope there is no legal stuff you have to go through, tough. But no problem on my part. Thanks.
@PhilippLackner
@PhilippLackner 4 жыл бұрын
@@henriquepetters with my own website I will have legal stuff to worry about, especially in Europe, but I can handle it. Thanks a lot, it really helps me!
@henriquepetters
@henriquepetters 4 жыл бұрын
Anytime, my friend.
@ShubhamSinghMusic
@ShubhamSinghMusic 3 жыл бұрын
Really simple explanation 👌🏻 Please never stop with such videos!
@PhilippLackner
@PhilippLackner 3 жыл бұрын
I will do my best, thanks :D
@tuqayabdullazade2565
@tuqayabdullazade2565 4 жыл бұрын
Thank you, sir, for simple explanation
@vinodkamble216
@vinodkamble216 4 жыл бұрын
Informative video Thank you Keep up the good work
@DharmikGohil-bw2ug
@DharmikGohil-bw2ug 6 ай бұрын
Really simple explanation thanks
@iamanegi
@iamanegi 4 жыл бұрын
Thank you brother!🤗 I was searching for the coroutines tutorial from a long time. Thank you very much.
@PhilippLackner
@PhilippLackner 4 жыл бұрын
No problem 👍
@dawoodamir2011
@dawoodamir2011 4 жыл бұрын
Well very good explaination looking forward for next content
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thank you man!
@mattgraves3709
@mattgraves3709 3 жыл бұрын
Excellent video and I will echo Florian and say the analogy was great. I enjoy both of your channels and that is one thing that you share that is essential in making the material stick.
@manjunathsharma1053
@manjunathsharma1053 2 жыл бұрын
Best way of explanation with simple example. Thank you. Just to cross verify, 1. application opens 2. Execute the sequence of coroutine within Global scope. 3. Hit back from activity. 4. Come back to application globalscope coroutine is not launching the sequence again till I quit the app. Is this correct? If yes it means globalscope coroutines will run only once within activity scope? Please clarify
@luislugo4006
@luislugo4006 2 жыл бұрын
Thanks for this awesome video :)
@go_better
@go_better 2 жыл бұрын
Thanks! That was easy and...not scary at all!
@amineayachi335
@amineayachi335 3 жыл бұрын
i love those coroutines well done man
@montuedge
@montuedge 6 ай бұрын
Example was quite good
@NicolasBeltrami
@NicolasBeltrami 4 жыл бұрын
Awesome content!! i'm starting with kotlin and you're helping me a lot! Thanks!
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thanks a lot!!
@bhaktibirachan
@bhaktibirachan 8 ай бұрын
Very Good and clear explanation.
@yutaitadori7318
@yutaitadori7318 3 жыл бұрын
Broooooooo ♥️loved this playlist
@PhilippLackner
@PhilippLackner 3 жыл бұрын
awesome!
@r.j.jeninjoseph4975
@r.j.jeninjoseph4975 3 жыл бұрын
Nice way to start liked the explanation
@chiragprajapati3989
@chiragprajapati3989 4 жыл бұрын
Awesome....just amazing
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thank you man🙏🙏
@pankajrana9668
@pankajrana9668 Жыл бұрын
that was so good explaination
@DungNguyen-ex8rh
@DungNguyen-ex8rh 3 жыл бұрын
Awesome example! It really help me understand the concept, keep up bro!
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Glad it helped!
@OlivierGeorg
@OlivierGeorg 3 жыл бұрын
No big theory, just step by step making us _feel_ how it works.
@peshutanpavri1599
@peshutanpavri1599 2 жыл бұрын
This is great. Thank you
@PhilippLackner
@PhilippLackner 2 жыл бұрын
you're welcome
@selvaganapathi7930
@selvaganapathi7930 3 жыл бұрын
Hi, I'm watching more than 10 videos about co-routine. But still, I'm confusing. After watching 2 videos from the playlist I was clearly the concepts. thx & keep going...
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Happy to help :)
@mohammedsaleh9677
@mohammedsaleh9677 3 жыл бұрын
What a great video
@vishweshwaranr2396
@vishweshwaranr2396 4 жыл бұрын
Your video is amazing please always post it.. I'm great fan of yours...
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Wow, thank you so much!
@arjangap2551
@arjangap2551 Жыл бұрын
Please enable divided sections in order to make using your connect more helpful and easy.
@debashishmahato4591
@debashishmahato4591 4 жыл бұрын
Very well explained..
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thank you so much 🙂
@abdulazizrasulbek
@abdulazizrasulbek 3 жыл бұрын
Good explanation with examples thanks
@PhilippLackner
@PhilippLackner 3 жыл бұрын
You are welcome
@chintankhetiya9513
@chintankhetiya9513 4 жыл бұрын
It's awesome 😌
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thanks!
@devOmarAZ
@devOmarAZ 3 жыл бұрын
u r GREAT!
@muzakkihafizh4169
@muzakkihafizh4169 4 жыл бұрын
Thanks, it's help me a lot about Corutine
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Glad to hear that!
@elpirato5428
@elpirato5428 3 жыл бұрын
thx
@semiautomaticpancak3
@semiautomaticpancak3 Жыл бұрын
Man I'm so jealous of how well you can run than emulator lol
@pavelb3734
@pavelb3734 4 жыл бұрын
"Охуительно!" means totally great, my friend, thanks a lot!
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thanks you're welcome
@play.againn
@play.againn 4 жыл бұрын
That's what i need it. Let's Start :)
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thanks!
@Giorgi.Japiashvili
@Giorgi.Japiashvili Жыл бұрын
60fps much appreciated
@tijojose2
@tijojose2 4 жыл бұрын
Nice work
@ImaginaryProgrammer
@ImaginaryProgrammer 4 жыл бұрын
Nice content
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thanks!
@jjhoninatan55sabadi
@jjhoninatan55sabadi 4 жыл бұрын
Are you gonna do a video with Coroutines + Firestore ?
@PhilippLackner
@PhilippLackner 4 жыл бұрын
First, I explain the general functionality of coroutines in some videos, what I do after that I don't know yet. But if some people request it, I will also show coroutines in a practical example
@jjhoninatan55sabadi
@jjhoninatan55sabadi 4 жыл бұрын
@@PhilippLackner thank you !! I will continue to watch your videos. Great job.
@shawngardner261
@shawngardner261 2 жыл бұрын
Is there a good approach of using coroutines for reading files. For example, I have an Android Java app that must read and parse this fairly large CSV file at startup. Doing this on the main thread is not a good idea since it affects the UI performance. So I use threads, but is there better way in Kotlin using coroutines, or just port the thread code over to Kotlin? Thanks!
@kevinsolanki6232
@kevinsolanki6232 3 жыл бұрын
😌😌😌
@abondutta
@abondutta 3 жыл бұрын
if i run a corutine for a long time, then the screen stays blank for long time. if i can show the screen as circular loading then it will be great. Ex: when doing a http request, if i can show a loader dialog then the user will know process is running
@smonkey001
@smonkey001 2 жыл бұрын
5:43 I will say "by swiping away the app, we killed the whole application process, so all its threads and their coroutines got killed".
@user-bk5il2fy1h
@user-bk5il2fy1h 2 жыл бұрын
i think the same coroutine get killed because of killing the app, global scope pointing to app lifecycle, not the main thread
@smonkey001
@smonkey001 2 жыл бұрын
@@user-bk5il2fy1h You're right. app lifecycle is the Android term of application process.
@devopsshiv3842
@devopsshiv3842 Жыл бұрын
In Coroutine why i have used GlobalScope() when i fetched data from API using Retrofit? Instead of GlobalScope() if i used different methods then what will happened?
@alfietapping4034
@alfietapping4034 3 жыл бұрын
4:10 my understanding is that the coroutine shouldn't run, as the main thread reaches the Log before the coroutine even starts, which should cancel all coroutines in the thread, could you tell me what im missing with this?
@PhilippLackner
@PhilippLackner 3 жыл бұрын
Why would reaching the log statement cancel the coroutines? The main thread doesn't finish just because onCreate is finished
@alfietapping4034
@alfietapping4034 3 жыл бұрын
​@@PhilippLacknerI was testing this in intelliJ and the coroutine never launches so i guess I was just confusing myself fun main(args: Array) { GlobalScope.launch { delay(2000L) print("coroutine finishing ") } print("Thread finishing") }
@djfahed3002
@djfahed3002 Жыл бұрын
Actually delaying a coroutine is the not the same thing as pausing it. I think there is no direct way to pause a coroutine.
@andyal868
@andyal868 4 жыл бұрын
Sir, what is ? val TAG = "MainActivity"
@weeraphongsombatboon9568
@weeraphongsombatboon9568 4 жыл бұрын
the TAG is the first value we insert into Log.d() . The value is just a String "MainActivity"
@Sk-gb2hx
@Sk-gb2hx 3 жыл бұрын
+
@naughtymachinegun
@naughtymachinegun 2 жыл бұрын
i see class i click away (H)
@mohameddarwish1347
@mohameddarwish1347 4 жыл бұрын
Sir; how can I use coroutines with a real api and receive data , how can I do it?
@PhilippLackner
@PhilippLackner 4 жыл бұрын
I will probably show some practical examples of coroutines after the more theoretical part, but not about real api, rather in general about Retrofit/Firestore or similar stufd
@mohameddarwish1347
@mohameddarwish1347 4 жыл бұрын
@@PhilippLackner Is retrofit a coroutines? I am confused about it
@PhilippLackner
@PhilippLackner 4 жыл бұрын
@@mohameddarwish1347 no Retrofit is a library to get data remotely, coroutines can help do implement that in a good way
@mohameddarwish1347
@mohameddarwish1347 4 жыл бұрын
Thanks 😊 I'm looking forward to your next video 😊
@PhilippLackner
@PhilippLackner 4 жыл бұрын
@@mohameddarwish1347 thanks!
@BavleenKaur10
@BavleenKaur10 Жыл бұрын
boo vdai lgayega paaji tuhadi vedio par tuhadi foto ni disi te mere dill nu mza ni aayea
@TRUTHF0RCE
@TRUTHF0RCE Жыл бұрын
The current docs only add the dependency: implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9") Is it correct? Or I need the "...corotines-core"?
Suspend Functions - Kotlin Coroutines
4:19
Philipp Lackner
Рет қаралды 70 М.
The Top 3 State Management Mistakes On Android
14:30
Philipp Lackner
Рет қаралды 23 М.
КАКУЮ ДВЕРЬ ВЫБРАТЬ? 😂 #Shorts
00:45
НУБАСТЕР
Рет қаралды 3,1 МЛН
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 18 МЛН
95% Don't Understand THIS About Coroutines (Main-Safety)
9:38
Philipp Lackner
Рет қаралды 27 М.
I Rewrote This Entire Main File // Code Review
16:08
The Cherno
Рет қаралды 156 М.
#1 Что такое корутина. Важные особенности || Курс по корутинам
16:40
Android Broadcast. Все об Андроид разработке
Рет қаралды 89 М.
KMP vs. Flutter - Who Will Win The Cross-Platform Battle?
16:19
Philipp Lackner
Рет қаралды 42 М.
Kotlin Coroutines 101 - Android Conference Talks
24:49
Android Developers
Рет қаралды 134 М.
The Essence of Coroutines
8:10
Dave Leeds
Рет қаралды 9 М.
Kotlin's better than Java? Or vice versa? Let's find out...
5:56
Jelvix | TECH IN 5 MINUTES
Рет қаралды 61 М.
Everything you need to know about Kotlin 2.0 🟣
11:05
Stevdza-San
Рет қаралды 63 М.