Kotlin Coroutines: Fundamentals

Learn the fundamentals about threads and coroutines, along with the basics of the Kotlin Coroutines framework. By Filip Babić.

Leave a rating/review
Download materials
Save for later

Learning path

This is part of the Android Data & Networking learning path. View path.

Who is this for?

Beginner Android developers who want to learn about Threading, what coroutines are, and how to launch a coroutine in Android.

Covered concepts

  • Blocking & Non-Blocking calls
  • Synchronous vs. Asynchronous code
  • Threads
  • Background processing
  • Worker Threads
  • Main or UI Thread
  • Runnables
  • Posting data to the UI
  • Kotlin Coroutines
  • Coroutine Builders
  • Dispatchers
  • Thread pools
  • Suspending
  • Nested coroutines

Part 1: Beginning Threads

Toggle description

Learn about blocking calls, background processing, creating threads and why using coroutines is increasingly popular!

Toggle description

Explore the project structure and functionality, run the project to see the UI, and prepare for next episodes.

Toggle description

Use an HTTP connection and an input stream, to download a cute owl image and display it in your app.

Toggle description

Create threads to move the blocking work away from the main thread, to the background.

Toggle description

Post the result to the main thread, using native Android mechanisms - Handlers and runOnUiThread().

Conclusion 1:56
Toggle description

Review the concepts learned so far, and prepare for the next part of the course - Kotlin Coroutines!

Part 2: Beginning Coroutines

Toggle description

Get started with some basic theoretical concepts of Kotlin Coroutines, and why they are becoming increasingly popular.

Toggle description

Launch a coroutine, using coroutine builders, and learn how to replace manual thread creation.

Toggle description

Use different dispatchers, to change the threads in coroutines, and learn what each dispatcher has to offer.

Toggle description

Learn how to post the data to the main thread, from anywhere, using the main dispatcher.

Conclusion 1:31
Toggle description

Review all the information about threading and coroutines you've gained, and learn about future courses you can explore on the topic!

Up next

Android & Kotlin
Room Database: Getting Started
Covers loads of cool concepts in local data persistence, using the Room database on Android. Learn how to ... more



Over 300 content creators. Join our team.