We Suspend This Program for an Important Announcement
summary
Android deprecates sync task in API level R (Android 11) and recommends Kotlin coroutines as a replacement; coroutines claim structured concurrency, cancellation, and lightweight suspension. Examples include converting WorkManager workers from blocking or listenable futures to a coroutine worker (reducing ~20 lines to ~3), Room and Retrofit offering suspend APIs, adapters for CompletableFuture and Tasks, and a demo where Android Studio 4.1 Database Inspector shows live DB edits updating a Flow in the UI. Expect state flow and shared flow for multi-subscriber sharing.
AI-written summary · about
chapters (16)
- 0:00Intro
- 0:23AsyncTask
- 0:54Kotlin coroutines
- 2:14Develop Android apps with
- 4:28WorkManager
- 8:17Room Database queries
- 8:44Your API Make it main-safe
- 9:57Your API Injecting dispatchers
- 10:29Coroutine adapters For common future APIs
- 12:30Kotlin Flow
- 15:01LiveData vs Flow
- 15:57LiveData vs State Flow State holder vs
- 16:55lifecycleScope and the pausing dispatcher
- 18:25callbackFlow Hot source, cold flow
- 21:29Thank you!
- 26:12Coroutines learning
related talks
37mAndroid Suspenders
38mAndroid Coroutines: How to manage async tasks in Kotlin
42mKotlin Coroutines: An Intro to Practical Use on Android
38mAndroid Suspenders
38mCoroutines by Example
40mBuilding Asynchronous Mechanisms in Android App, Using Kotlin Coroutines
44mTesting Kotlin Coroutines
42mKotlin Coroutines: Beyond async/await
