Kotlin Coroutines In Android

Tags: Kotlin

Learn Kotlin Coroutines in depth and practice advanced Coroutines use cases in Android application

Last updated 2022-01-10 | 4.7

- Use Kotlin Coroutines to implement the most common flows in Android applications
- Learn the best practices of software design with Coroutines
- Understand Coroutines cancellation and error handling in details

What you'll learn

Use Kotlin Coroutines to implement the most common flows in Android applications
Learn the best practices of software design with Coroutines
Understand Coroutines cancellation and error handling in details
Write unit tests using Coroutines
Debug the most common issues in Coroutines-based code
Grasp the bigger picture of Structured Concurrency

* Requirements

* Basic experience with Android and Kotlin

Description

This course is your complete guide into the world of Kotlin Coroutines in Android. By the end of this course, you will feel confident to use Coroutines to write reliable, maintainable and responsive applications.

The philosophy of this course is "learn by coding", so you're going to master Coroutines by solving a series of carefully designed, hands-on exercises. These exercises are built into a tutorial Android application to make them as similar to the "real world" as possible. Therefore, you'll gain practical experience with Coroutines in various typical scenarios that you'll surely encounter in your own Android apps.

All aspects of Coroutines framework are covered in this course:

  • Coroutines as concurrency framework

  • Suspending vs blocking functions

  • Coroutine scope, context and jobs hierarchy

  • Coroutines cancellation

  • Exceptions handling inside Coroutines

  • Structured Concurrency

  • Unit testing with Coroutines

  • and more...

Even though the main goal of this course is to give you practical skills, it also covers all the theory required to understand Coroutines framework at a more conceptual level. In particular, you're going to learn what Structured Concurrency is, what benefits it provides and how Coroutines implement this advanced paradigm.

We will go beyond the functionality of Coroutines framework itself and discuss important design considerations that you need to be aware of to write code that both works right now, and will also be maintainable in the long term.

Given the ever-increasing adoption of Kotlin, it's evident that Coroutines are the future of concurrency in Android world. Therefore, knowledge of this framework is going to become a mandatory skill for Android developers going forward. After completing this course, you'll be able to write reliable and maintainable concurrent code in Android projects using Coroutines framework, and you'll be able to answer even the most tricky questions about this framework at job interviews.

So, if you're serious about Android development and you want to master Kotlin Coroutines, this course is a perfect match for you!

Who this course is for:

  • Professional Android developers

Course content

11 sections • 82 lectures

Introduction Preview 03:49

Tutorial Application Preview 02:49

Udemy Course Review System Preview 01:19

UI Thread Blocking Preview 09:02

Concurrency Preview 07:07

Background Threads Preview 10:47

Coroutines Basics Preview 26:45

Coroutines Basics Nuances Preview 05:32

Exercise 1 Preview 08:47

Exercise 1 Solution Preview 07:46

Coroutines Cancellation Basics Preview 15:18

Exercise 2 Preview 05:44

Exercise 2 Solution Preview 05:19

Concurrent Coroutines Preview 18:22

Suspension vs Blocking Preview 07:52

Coroutine Scope's Children Cancellation Preview 04:58

Exercise 3 Preview 04:01

Exercise 3 Solution Preview 07:28

Coroutines Intuition Summary Preview 09:10

Coroutine Scope Cancellation Preview 01:11

Scope Cancellation vs Scope's Children Cancellation Preview 08:00

Coroutine Scope Inside ViewModel Preview 14:32

Coroutine Scope From Kotlin Extensions for ViewModel Preview 03:55

Coroutine Scope Cancellation Summary Preview 01:46

Structured Concurrency Intro Preview 01:26

Fibonacci Computation Preview 05:08

Concurrent Fibonacci Computation Preview 15:33

Concurrent Fibonacci Computation with Callback on UI Thread Preview 08:19

Concurrent Fibonacci Computation Using ThreadPoster Library Preview 10:16

Structured Concurrency Preview 18:14

Concurrent Fibonacci Computation Using Coroutines (Callback) Preview 24:52

Concurrent Fibonacci Computation Using Coroutines (Suspending) Preview 17:29

Exercise 4 Preview 06:47

Exercise 4 Solution Preview 06:28

Structured Concurrency Summary Preview 07:16

The Main Rule of Concurrency in Android Preview 05:21

Encapsulating Concurrency in Use Cases Preview 10:26

Exercise 5 Preview 02:20

Exercise 5 Solution Preview 05:24

Design with Coroutines Summary Preview 04:23

Coroutine Dispatchers Preview 01:49

Main Dispatcher Preview 11:09

Background Dispatchers Preview 06:01

Unconfined Dispatcher Preview 07:35

The Best Dispatching Strategy for Android Applications Preview 13:48

Coroutines Cancellation Intro Preview 01:45

Cooperative Cancellation Preview 19:21

The Importance of Cancellation Exception Preview 17:39

Exercise 6 Preview 02:41

Exercise 6 Solution Preview 06:05

NonCancellable Preview 12:13

Coroutines Cancellation Summary Preview 04:30

Main Coroutines Building Blocks Preview 02:59

Coroutines Mechanics Part 1: CoroutineScope and CoroutineContext Preview 17:28

Coroutines Mechanics Part 2: CoroutineContext Elements Preview 09:03

Coroutines Mechanics Part 3: withContext Function Preview 08:40

Coroutines Mechanics Part 4: Jobs Hierarchy Preview 10:20

Coroutines Mechanics Part 5: Cancellation Propagation Preview 13:33

Coroutines Mechanics Part 6: NonCancellable vs Job() Preview 13:14

Exercise 7 Preview 05:23

Exercise 7 Solution Preview 22:51

Exercise 7 Solution Amendment Preview 03:34

Coroutines Mechanics Summary Preview 10:44

Parallel Decomposition Preview 03:10

Exercise 8 Preview 11:44

Exercise 8 Solution Preview 11:23

Shared Mutable State Preview 15:51

Async Coroutine Builder Preview 19:02

Exercise 9 Preview 02:47

Exercise 9 Solution Preview 04:43

Parallel Decomposition Summary Preview 04:38

Exceptions Handling Intro Preview 02:20

Uncaught Exception in a Coroutine Preview 10:49

CoroutineExceptionHandler Preview 07:25

Cancellation Chain on Uncaught Exception Preview 10:08

SupervisorJob Preview 05:48

Exercise 10 Preview 03:07

Exercise 10 Solution Preview 09:22

Uncaught Exception in Async Coroutine Preview 10:06

The Best Way to Handle Exceptions in Coroutines Preview 10:15

Exceptions Handling Summary Preview 05:33