Kotlin Coroutines by Tutorials
β Scribed by Filip BabiΔ, Luka KordiΔ and Nishant Srivastava
- Publisher
- raywenderlich.com
- Year
- 2022
- Tongue
- English
- Leaves
- 287
- Edition
- 3
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Table of Contents
Book License
What You Need
Book Source Code & Forums
Acknowledgments
Content Development
Introduction
About Kotlin
About Coroutines
How to read this book
Chapter 1: What Is Asynchronous Programming?
Providing Feedback
Why Multithreading?
Interacting With the UI Thread From the Background
Handling Work Completion Using Callbacks
Indentation Hell
Using Reactive Programming for Background Work
Diving Deeper Into the Complexity of Rx
A Blast From the Past
Explaining Coroutines: The Inner Work
Variations Through History
Key Points
Where to Go From Here?
Chapter 2: Setting Up Your Build Environments
Choosing the Build Environments
Installing the IntelliJ IDEA
Installing the Android Environment
Importing a Project
Key Points
Where to Go From Here?
Chapter 3: Getting Started With Coroutines
Executing Routines
Launching a Coroutine
Building Coroutines
Explaining Jobs
Canceling Jobs
Digging Deeper Into Coroutines
Posting to the UI Thread
Key Points
Where to Go From Here?
Chapter 4: Suspending Functions
Suspending vs. Non-Suspending
Elaborating Continuations
Creating Your Own Suspendable API
Returning Values Using withContext
Key Points
Where to Go From Here?
Chapter 5: Async/Await
The Async/Await Pattern
Learning From the Past
Using Async/Await
Deferring Values
Combining Multiple Deferred Values
Being Cooperative and Structured
Key Points
Where to Go From Here?
Chapter 6: Coroutine Context
Contextualizing Coroutines
Providing Contexts
Key Points
Chapter 7: Context Switch & Dispatching
Work Scheduling
Coroutine Dispatcher Types
Using Dispatchers
Key Points
Chapter 8: Exception Handling
Exception Propagation
CoroutineExceptionHandler
Try-Catch to the Rescue
Handling Multiple Child Coroutine Exceptions
Callback Wrapping
Supervising Coroutines
Key Points
Where to Go From Here?
Chapter 9: Manage Cancellation
Cancelling a Coroutine
Timing Out
Key Points
Where to Go From Here?
Chapter 10: Building Sequences & Iterators With Yield
Getting Started With Sequences
Enter: Sequence
Generators & Sequences
Yielding From SequenceScope
Providing Values With Yield & YieldAll
Key Points
Where to Go From Here?
Chapter 11: Beginning With Coroutine Flow
Streams of Data
Limitations of Streams
A New Approach to Streams
Flow Constraints
Key Points
Where to Go From Here?
Chapter 12: SharedFlow & StateFlow
Getting Started
Sharing a Flow
Building a StateFlow
Key Points
Where to Go From Here?
Chapter 13: Testing Coroutines
Getting Started
Writing Tests for Coroutines
Setting Up the Test Environment
Summing it up
Key Points
Chapter 14: Coroutines & Android
The Importance of the Android Main Thread
Getting Started
Doing Heavy Work on UI Thread
Thread
Handler
HandlerThread
Executors
RxJava
Coroutines
Key Points
Where to Go From Here?
Chapter 15: Coroutines in the UI Layer
Getting Started
Introducing Lifecycle Scope
Collecting Flows in the UI
Key Points
Where to Go From Here?
Chapter 16: Networking With Coroutines
Getting Started
Network Call With Callbacks
Coroutine-Powered Networking
Retrofit Meets Coroutines
Key Points
Where to Go From Here?
Chapter 17: Persistence & Coroutines
Getting Started
Suspending Database Calls
Observing Database Changes
Suspending Transactions
Key Points
Where to Go From Here?
Chapter 18: Coroutines & Jetpack
Coroutines in ViewModels
Comparing LiveData to Kotlin Flow
Coroutines & Flow in Jetpack Compose
Testing Coroutines on Android
Key Points
Where to Go From Here?
Conclusion
π SIMILAR VOLUMES
<h2>Learn Coroutines in Kotlin and Android!</h2><p>Executing background tasks has always been a big challenge in every environment and, in particular, on mobile devices where resources are limited. Kotlin has simplified the way you can write code improving your productivity with a new programming pa
<h2>Learn Coroutines in Kotlin and Android!</h2><p>Executing background tasks has always been a big challenge in every environment and, in particular, on mobile devices where resources are limited. Kotlin has simplified the way you can write code improving your productivity with a new programming pa
Build native apps faster and more reliably by sharing code across Android, iOS and desktop. The best book to teach you how to share code across platforms using Kotlin Multiplatform. Youβll gain the foundation of creating user interfaces using native UI toolkits and then writing common code for se