Understand Kotlin Coroutines on Android
summary
Explains concrete coroutines features now in Jetpack: a LiveData builder that runs coroutine blocks with a configurable context and a short timeout window to avoid wasted work during rapid rotate, lifecycleScope and viewModelScope to cancel coroutines on destroy while keeping long work across config changes using CompletableDeferred, WorkManager/Room/Retrofit support for suspend functions, and a kotlinx-coroutines-test story (testCoroutineDispatcher, runBlockingTest, advanceTimeBy) that makes deterministic unit tests and avoids flakiness.
AI-written summary · about
chapters (5)
- 0:00Start
- 0:36The Dream Code
- 1:26The Working Code
- 3:32Focused on 3 Solutions
- 19:18Lifecycle of the block
related talks
40mBuilding Asynchronous Mechanisms in Android App, Using Kotlin Coroutines
38mAndroid Coroutines: How to manage async tasks in Kotlin
35mEfficient Async with Kotlin Coroutines
40mDeep diving into the Kotlin Coroutines API
30mBetter asynchronous programming with Kotlin Coroutines
36mCracking Kotlin Coroutines
43mAsynchronous programming using Coroutines
32mNetworking the Kotlin way: Retrofit + Coroutines
