Surprise Me!

Multipart Kotlin Coroutines Course - E05 - Advance - The Android Kotlin Coroutine Scopes 1/2

2025-03-13 4 Dailymotion

In this video I am talking about two scopes of the Android world. Specifically I am discussing the viewModelScope and the lifecycleScope and how they are physically different from each other. I also discuss how they play a role in ensuring proper cancellation of coroutines when they are launched from scopes associated with lifecycles. This video is considered advanced because before we can understand scope in Android we need to understand what coroutines are, what are their contexts, and what is a scope. We also need to understand what is a Thread, how is it possible to run coroutines in parallel and their dependency on Threads. Nonetheless, having these principles in mind, this video should be easy to follow. Let me know what you think about this video and what you have learned with it. As usual make sure to stay tech, keep programming, be kind and have a good one! <br /><br />--- <br /><br />Chapters: <br /><br />00:00:00 Start <br />00:00:21 Intro <br />00:01:54 Revisiting previous example <br />00:02:34 Referencing Generic Scopes - https://www.youtube.com/watch?v=SstFGOcu3ls <br />00:02:54 The viewModelScope and the lifecycleScope code layout <br />00:11:27 The viewModelScope explained <br />00:15:50 The lifecycleScope explained <br />00:17:29 Closing notes <br />00:18:10 See you in the next video! <br />00:18:57 End credits <br />00:19:26 Disclaimer <br /><br />--- <br /><br />Source code: <br /><br />- https://github.com/jesperancinha/matrix-anywhere-android <br /><br />--- <br /><br />Soundtrack: <br /><br />- https://soundcloud.com/joaoesperancinha/slow-guitar-9-jesprotech <br /><br />--- <br /><br />Related videos: <br /><br />- https://youtube.com/shorts/wqL_1imGhaY?feature=share <br />- https://youtube.com/shorts/JBWEJaxlVYY?feature=share <br />- https://youtu.be/CQXIuyxMD_I <br />- https://youtube.com/shorts/VIITIP4-WWU?feature=share <br />- https://youtube.com/shorts/vr8lVaF4EQw?feature=share <br />- https://youtube.com/shorts/79TQHidjX6Q?feature=share <br />- https://youtube.com/shorts/62yqXEJnl3U?feature=share <br /><br />--- <br /><br />As a short disclaimer, I'd like to mention that I'm not associated or affiliated with any of the brands eventually shown, displayed, or mentioned in this video. <br /><br />--- <br /><br />All my work and personal interests are also discoverable on other different sites: <br /><br />- My Website - https://joaofilipesabinoesperancinha.nl/ <br />- Reddit - https://www.reddit.com/user/jesperancinha <br />- Credly - https://www.credly.com/users/joao-esperancinha/badges <br />- Pinterest - https://nl.pinterest.com/jesperancinha/ <br />- Facebook - https://www.facebook.com/joaofisaes/ <br />- Spotify - https://open.spotify.com/user/jlnozkcomrxgsaip7yvffpqqm <br />- Daily Motion - https://www.dailymotion.com/jofisaes <br />- Bluesky - https://bsky.app/profile/jesperancinha.bsky.social <br /><br />--- <br /><br />If you have any questions about this video please put a comment in the comment section below and I will be more than happy to help you or discuss any related topic you'd like to discuss. <br /><br />If you want to discover more about my open-source work please visit me on GitHub at: <br /><br />- GitHub - https://github.com/jesperancinha

Buy Now on CodeCanyon