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!
---
Chapters:
00:00:00 Start
00:00:21 Intro
00:01:54 Revisiting previous example
00:02:34 Referencing Generic Scopes - https://www.youtube.com/watch?v=SstFGOcu3ls
00:02:54 The viewModelScope and the lifecycleScope code layout
00:11:27 The viewModelScope explained
00:15:50 The lifecycleScope explained
00:17:29 Closing notes
00:18:10 See you in the next video!
00:18:57 End credits
00:19:26 Disclaimer
---
Source code:
- https://github.com/jesperancinha/matrix-anywhere-android
---
Soundtrack:
- https://soundcloud.com/joaoesperancinha/slow-guitar-9-jesprotech
---
Related videos:
- https://youtube.com/shorts/wqL_1imGhaY?feature=share
- https://youtube.com/shorts/JBWEJaxlVYY?feature=share
- https://youtu.be/CQXIuyxMD_I
- https://youtube.com/shorts/VIITIP4-WWU?feature=share
- https://youtube.com/shorts/vr8lVaF4EQw?feature=share
- https://youtube.com/shorts/79TQHidjX6Q?feature=share
- https://youtube.com/shorts/62yqXEJnl3U?feature=share
---
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.
---
All my work and personal interests are also discoverable on other different sites:
- My Website - https://joaofilipesabinoesperancinha.nl/
- Reddit - https://www.reddit.com/user/jesperancinha
- Credly - https://www.credly.com/users/joao-esperancinha/badges
- Pinterest - https://nl.pinterest.com/jesperancinha/
- Facebook - https://www.facebook.com/joaofisaes/
- Spotify - https://open.spotify.com/user/jlnozkcomrxgsaip7yvffpqqm
- Daily Motion - https://www.dailymotion.com/jofisaes
- Bluesky - https://bsky.app/profile/jesperancinha.bsky.social
---
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.
If you want to discover more about my open-source work please visit me on GitHub at:
- GitHub - https://github.com/jesperancinha
---
Chapters:
00:00:00 Start
00:00:21 Intro
00:01:54 Revisiting previous example
00:02:34 Referencing Generic Scopes - https://www.youtube.com/watch?v=SstFGOcu3ls
00:02:54 The viewModelScope and the lifecycleScope code layout
00:11:27 The viewModelScope explained
00:15:50 The lifecycleScope explained
00:17:29 Closing notes
00:18:10 See you in the next video!
00:18:57 End credits
00:19:26 Disclaimer
---
Source code:
- https://github.com/jesperancinha/matrix-anywhere-android
---
Soundtrack:
- https://soundcloud.com/joaoesperancinha/slow-guitar-9-jesprotech
---
Related videos:
- https://youtube.com/shorts/wqL_1imGhaY?feature=share
- https://youtube.com/shorts/JBWEJaxlVYY?feature=share
- https://youtu.be/CQXIuyxMD_I
- https://youtube.com/shorts/VIITIP4-WWU?feature=share
- https://youtube.com/shorts/vr8lVaF4EQw?feature=share
- https://youtube.com/shorts/79TQHidjX6Q?feature=share
- https://youtube.com/shorts/62yqXEJnl3U?feature=share
---
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.
---
All my work and personal interests are also discoverable on other different sites:
- My Website - https://joaofilipesabinoesperancinha.nl/
- Reddit - https://www.reddit.com/user/jesperancinha
- Credly - https://www.credly.com/users/joao-esperancinha/badges
- Pinterest - https://nl.pinterest.com/jesperancinha/
- Facebook - https://www.facebook.com/joaofisaes/
- Spotify - https://open.spotify.com/user/jlnozkcomrxgsaip7yvffpqqm
- Daily Motion - https://www.dailymotion.com/jofisaes
- Bluesky - https://bsky.app/profile/jesperancinha.bsky.social
---
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.
If you want to discover more about my open-source work please visit me on GitHub at:
- GitHub - https://github.com/jesperancinha
Category
🤖
Tech