Building Asynchronous Mechanisms in Android App, Using Kotlin Coroutines
summary
Claims that a large portion of the Kotlin Coroutines API lets Android apps get testable, scalable, clean asynchronous mechanisms, then shows the concrete pieces: custom scope and job management in a presenter, a retrying generic Retrofit mapper built with suspendCoroutine and explicit retry/delay, an example of three parallel requests combined with async/await, and how switching to Room/Retrofit suspend functions removes boilerplate; custom approach works but is bulkier, library integration works and keeps code tiny.
AI-written summary · about
chapters (8)
- 0:00Start
- 3:05What are Coroutines?
- 4:27Routine lifecycle (w/ coroutines)
- 5:36What's in the API
- 19:57Building Generic Retrofit Calls
- 30:03Best Practices
- 31:04Layered approach
- 36:31Two ways of handling exceptions
related talks
42mKotlin Coroutines: An Intro to Practical Use on Android
35mEfficient Async with Kotlin Coroutines
44mTesting Kotlin Coroutines
37mAndroid Suspenders
32mNetworking the Kotlin way: Retrofit + Coroutines
38mUnderstand Kotlin Coroutines on Android
43mAsynchronous programming using Coroutines
38mAndroid Coroutines: How to manage async tasks in Kotlin
