
Explore the fundamentals of Kotlin coroutines and their integration with the Android platform, learning concurrency, cancellation, failure handling, and common pitfalls through practical code walkthroughs and hands-on assignments.
Welcome to a practical course blending Kotlin coroutines theory and coding with Android app development, offering zip and GitHub sample code and easy import into IntelliJ IDEA or Android Studio.
Discover why we need coroutines and what they do, and outline the reasons for using them. Create your first coroutine and review PDFs and code samples in the resources area.
Explore why Kotlin coroutines replace callback chaos with asynchronous code that reads like synchronous code, improving exception handling, resource disposal, and thread management in Android development.
Explore asynchronous, non-blocking programming with Kotlin coroutines. Learn how coroutines act as a supercharged runnable that suspends and resumes, decoupled from threads, enabling fluid, scalable concurrency and context switching.
Explore how Kotlin coroutines are structured, with an abstract base class implementing job, continuation, and scope interfaces; learn concrete implementations and how to instantiate them with the build function.
Learn how to set up your first Kotlin coroutine project in IntelliJ IDEA, configure Gradle dependencies, and prepare the build environment before writing your first coroutine.
Create your first coroutine by defining a scope with a dispatcher, launching with launch, and running suspend functions like delay inside a runBlocking context.
Explore structure concurrency and learn how to run tasks within a controlled structure using Kotlin coroutines; access code samples and a quick quiz in the resources.
Explore structured concurrency in Kotlin coroutines, using coroutine scope to manage parent-child relationships and handle exceptions and cancellations within a local scope.
Explore the coroutine scope and its role in structure concurrency, as shown in a Kotlin project, including the launch builder, code routine context, and dispatcher behaviors.
Discover the structure of the coroutine context. See how a coroutine scope builds a persistent parent context with dispatcher, job, and exception handler, plus the default coroutine name.
Explore structured concurrency and the central role of the job in routines. The lecture guides the code team workflow and points you to downloadable sample code in the resources.
Define the job interface as the lifecycle controller of coroutines, enabling parent-child hierarchies and structured concurrency, with launch builder creating standalone code routines within a scope.
Explore two main implementation streams for the job interface within the coroutine context. Preview the roles of job import and supervisor job import.
Discover how to start and join coroutines correctly by using the job interface, start and lazy states, and the join and join all patterns to manage multiple jobs.
Explore the Kotlin coroutines job lifecycle, from new to active, completing, and completed, including cancellation and exception handling, using public properties isActive, isCancelled, and isCompleted.
examine Kotlin coroutines job states from new to active, through canceling to completed, including transient states, and observe log states extension reporting is active, is cancelled, and is completed.
Explore how different types of coverage influence the team's approach to building a function, and learn about the recovery team, with downloadable code samples and resources.
Discover how dispatchers in Kotlin coroutines assign threads for code execution, including default, IO, and main dispatchers, and learn to switch contexts with withContext to interact with the user interface.
Explore how structure concurrency defines the root coroutine as the top level in a hierarchy, with parent-child relationships and nested coroutines, including independent ones.
Explore the coroutine exception handler as a root catchall that logs unhandled errors. It fires only for unhandled exceptions and propagates up to the root.
Explore Kotlin coroutines structure concurrency by inspecting builder functions such as launch and async, how they operate from non suspending code, and how scope creates parent–child relationships and context propagation.
Explore runBlocking, a coroutine builder that blocks the main thread until its code block completes, showing how it interacts with launch and context switching.
Explore creating a coroutine with a coroutine scope and launch or async builders, and understand suspending functions and context switching to avoid blocking the main thread.
Explore the fundamentals of suspend functions to control flow and return values from synchronous and asynchronous operations, while maintaining sequential code syntax and following along with sample Kotlin code.
Explore suspend functions and coroutines to make long-running tasks asynchronous, preventing main thread blocking by using suspend modifiers and a launch coroutine to run the log hello world sequence.
The suspend modifier passes a continuation object, turning suspend functions into CPS-style methods. The compiler uses a state machine with labels to resume after callbacks, making code feel synchronous.
Learn how suspending functions keep the main thread unblocked by using the suspend modifier and with context to run code safely in a non-blocking Android UI.
Explore why suspend alone doesn't make code non-blocking and how withContext and dispatchers, along with runBlocking, preserve main safety when suspending functions run on different threads.
Explore upcoming topics in software development through a dynamic video section that covers call-related concerns, welcomes your questions, and adds new content based on learner feedback.
Clarify the v1.5.x upgrade: the private parent context is removed; use the parent handle to inspect the direct parent in the debugger and stay aligned with the public API.
Explore how to use the async builder with launch to implement concurrency and achieve performance improvements, with downloadable code samples in the resources.
Learn to use the async coroutine builder to run hello and world messages concurrently, retrieving results via a deferred object and await on the default dispatcher.
Learn how to ensure coroutine safety by passing the default dispatcher to the async builder, observe hello and world messages running on correct dispatchers, and understand dispatcher inheritance versus withContext.
Learn to achieve concurrency in Kotlin coroutines using the launch builder instead of async. See how launch returns a job, print inside the block, and return completed in main.
Pass a dispatcher to the launch builder to switch threading context with default dispatcher. Observe the hello world log on the main thread and inspect the returned job at breakpoint.
Learn how to manage concurrency by using a group coating for scope clarity, a feature introduced to run many coatings simultaneously and gain structure, with code samples in resources.
Group coroutines organize child coroutines under a shared parent context, enabling cancellations and structured exception handling with supervisor scope and timeout routines, and clarify dispatcher choices via with context.
Understand how coroutineScope groups child coroutines to finish as a unit, enabling structured concurrency, and compare its behavior with withContext and runBlocking for dispatchers and cancellation handling.
Introduce Android Studio and an Android app as a learning tool, compare the main thread approach with callbacks, and set the stage for integrating Kotlin coroutines in Android.
Learn how Kotlin coroutines keep the main thread responsive in Android Studio by preventing blocking during a simulated image load with code routines.
Blocking the main thread in an Android app freezes the UI, and the lecture sketches evolving toward callbacks and code routines (coroutines) for readability and maintainability.
Explore how the view model coordinates a clock and image fetch via a repository and a mock network service, using live data, data binding, and threading to update the UI.
Explore why the app blocks the main thread during image loading, causing the user interface to freeze as a simulated network call runs, so onDraw isn't called.
Learn non blocking behavior with callbacks and a separate worker thread to download images, handling on success and on failure to update the UI in Kotlin coroutines.
Discover how callbacks manage success and error paths while performing network calls in the background, freeing the main thread to refresh the user interface and display results.
Learn how to successfully program Kotlin Coroutines to build scalable, resilient, bomb proof Coroutines!
Asynchronous or non-blocking programming is an important part of the development landscape.
Kotlin solves this problem in a flexible way by providing coroutine support at the language level and delegating most of the functionality to libraries. In addition to opening the doors to asynchronous programming, coroutines also provide a wealth of other possibilities, such as concurrency and actors.
However, while using and learning Coroutines on the surface seem easy and straightforward, when we try to
something vaguely interesting we soon start hitting 'gotchas' - it's not so easy and straightforward after all :( especially when we start adding Android App development to the mix.
Understanding what's going on behind the scenes is essential for building scalable, robust Asynchronous or non-blocking code.
Sometimes the magic of Coroutines can be just that, magic but with a bite!!
This course takes away the mystery to successful Kotlin Coroutine development.
I dive deep behind the scenes, so we can understand what's going on and why...
This is the only way learning becomes knowledge!
So you can take this new knowledge onto your next project and blow colleagues away with your Coroutine skills!!
Topics covered include the basics to the advanced and leaves nothing behind.
We dive into:
1) Why we should use Coroutines?
2) Structured Concurrency.
3) Suspendable functions.
4) Achieving Concurrency.
5) Grouping Coroutines.
6) Android Apps with Coroutines including the Android Jetpack framework.
7) Cancellations.
8) Failures.
9) Supporting Callbacks with Coroutines.
10) Modern 3rd party frameworks with Coroutines.
11) Shared State.
The course also includes a couple of hands on assignments for you to complete along with numerous Quizzes, to help turn your learning into knowledge.
I only ask that you come open minded and ready to learn.