Starting our First Coroutine - Kotlin Coroutines
Вставка
- Опубліковано 19 сер 2024
- 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...
The explanation with the construction workers was genius 👌
Thanks mate 💪
Waiting from yours, bro..
I was thinking the same Florian
good
Rarely have I commented on a video, but this video is awesome
The best video about Coroutine online! No begging for likes or subscribers, just pure knowledge!!... Thank you
The explanation with the construction workers was easy to understand, Thanks!
I'm just starting with kotlin and this series is helping me big time, thank you for that man!
Thanks, you're welcome!
best android development channel on youtube
Thank you so much for your comment ❤️
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!😄
Glad it was helpful!
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!!
Thanks for all your comments Matt, glad you enjoy the videos 👍👍
Thanks! Construction analogy was so good
Glad it was helpful!
Every bit of your explanation is so crisp and clear😊 Thank you for your efforts🙏🏻
Awesome, I shifted my development completely to kotlin by following your video, please create more videos on projects
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.
clear and on point ... no rubbish talks
impressed
Thank you so much !! Clear Explanation
Thank you so much for this video.
kudos to your explanation
this channel really deserves more subscribers
Thanks a lot!
Such a clear explanation loved it subscribed
Dude, your content is what was missing in youtube. Thanks again and please, keep the videos coming. :D
Thank you so much🙏🙏
Would it be okay for you if I use your comment as a testimonial on my future website?
@@PhilippLackner Please, use it.I hope there is no legal stuff you have to go through, tough. But no problem on my part. Thanks.
@@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!
Anytime, my friend.
don't know how i find this channel. Very easy to understand Coroutines.
Nice! Thanks
Really simple explanation 👌🏻
Please never stop with such videos!
I will do my best, thanks :D
Super cool!
Thanks!!
Really simple explanation thanks
Thank you, sir, for simple explanation
Informative video
Thank you
Keep up the good work
Thank you brother!🤗
I was searching for the coroutines tutorial from a long time. Thank you very much.
No problem 👍
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.
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
Example was quite good
Awesome content!! i'm starting with kotlin and you're helping me a lot! Thanks!
Thanks a lot!!
Thanks for this awesome video :)
that was so good explaination
Well very good explaination looking forward for next content
Thank you man!
This is great. Thank you
you're welcome
i love those coroutines well done man
Please enable divided sections in order to make using your connect more helpful and easy.
Thanks! That was easy and...not scary at all!
Very Good and clear explanation.
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...
Happy to help :)
Awesome example! It really help me understand the concept, keep up bro!
Glad it helped!
Awesome....just amazing
Thank you man🙏🙏
What a great video
Broooooooo ♥️loved this playlist
awesome!
Very well explained..
Thank you so much 🙂
Nice way to start liked the explanation
Your video is amazing please always post it.. I'm great fan of yours...
Wow, thank you so much!
thx
Good explanation with examples thanks
You are welcome
u r GREAT!
It's awesome 😌
Thanks!
Thanks, it's help me a lot about Corutine
Glad to hear that!
No big theory, just step by step making us _feel_ how it works.
"Охуительно!" means totally great, my friend, thanks a lot!
Thanks you're welcome
That's what i need it. Let's Start :)
Thanks!
Nice work
Man I'm so jealous of how well you can run than emulator lol
60fps much appreciated
Nice content
Thanks!
Are you gonna do a video with Coroutines + Firestore ?
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
@@PhilippLackner thank you !! I will continue to watch your videos. Great job.
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!
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?
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
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?
Why would reaching the log statement cancel the coroutines? The main thread doesn't finish just because onCreate is finished
@@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")
}
😌😌😌
Sir, what is ?
val TAG = "MainActivity"
the TAG is the first value we insert into Log.d() . The value is just a String "MainActivity"
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".
i think the same coroutine get killed because of killing the app, global scope pointing to app lifecycle, not the main thread
@@user-bk5il2fy1h You're right. app lifecycle is the Android term of application process.
Sir; how can I use coroutines with a real api and receive data , how can I do it?
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
@@PhilippLackner
Is retrofit a coroutines? I am confused about it
@@mohameddarwish1347 no Retrofit is a library to get data remotely, coroutines can help do implement that in a good way
Thanks 😊
I'm looking forward to your next video 😊
@@mohameddarwish1347 thanks!
Actually delaying a coroutine is the not the same thing as pausing it. I think there is no direct way to pause a coroutine.
i see class i click away (H)
+
boo vdai lgayega paaji tuhadi vedio par tuhadi foto ni disi te mere dill nu mza ni aayea
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"?