This is a collection of code samples and demonstrations focusing on Android development, specifically Jetpack Compose and Kotlin coroutines.
The goal of this repository is to visually illustrate the usage of complex Android concepts. The samples aim to be interactive.
All of the video illustrations have corresponding code representations.
Feel free to play around with these examples to get a better understanding of each of the concepts.
- Coroutines Examples
- Coroutine cooperation. Building a cooperative coroutine. Link
- The difference between
async {}
andlaunch{}
. How it influences coroutine execution and cancellation. Link - How
coroutineScope {}
influences the order of execution in coroutines Link - Why is
CancellationException
special? How exception propagation works. Link
- Jetpack Compose Examples
- Other Android Concepts
- Multiple processes. How you can have your app run in different processes. Link
- Progress animation
Learn how isActive
and CancellationException
can be utilized for efficient coroutine cooperation.
final.trimmed.mov
Explore the differences between async{}
and launch{}
and how scopes affect their execution and cancellation.
My.Movie.5.mp4
Understand how coroutineScope
influences coroutine order of execution.
My.Movie.6.mp4
Learn why CancellationException
is special in Kotlin coroutines and how exceptions are propagated from child to parent.
exceptions_video.mov
Demonstrates the usage of LaunchedEffect
and rememberUpdatedState
in Jetpack Compose.
My.Movie.2.mp4
Discover the use of rememberCoroutineScope()
for canceling coroutine execution within Compose.
example.mp4
You can drag and drop the two modifiers in order to discover how it will influence the Composable.
newrecording.mov
Two services are launched in different processes and both of the have a RuntimeException(). One service crashes the app and the one that is in the separate process does not.
a865c3cb-fa81-48a1-9898-4595a19a16f9.mp4
A creative progress animation developed using Canvas
, inspired by UX flame.