Skip to content

About

Interactive Kotlin Coroutines and Flow examples for Android: cancellation, structured concurrency and error handling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Coroutine Lab

Español · CI

An Android app for comparing Kotlin Coroutines and Flow. Run fictional travel requests and inspect their order, results, cancellation and errors in an event log. No account or external service is needed.

Coroutine Lab running in an Android emulator

Try it

  1. In Flow, select concat, merge or latest and run it. Compare which requests finish and in what order.
  2. In Structure, start cancellable work. Switch to Guide and select Cancel in the toolbar; the ViewModel still owns the running job.
  3. In Errors, compare local catch, async/await, CoroutineExceptionHandler and supervisorScope. Expected failures are recorded without closing the app.
  4. In Cases, simulate typing and compare sequential/parallel loading. Timings describe this fictional run, not a production benchmark.
  5. Clear events removes the log after work stops. It does not cancel work.

Build and run

Use JDK 17, Android SDK 36 and API 26+ for installation. Open the project in Android Studio or configure the SDK in an untracked local.properties. From this directory:

./gradlew :app:testDebugUnitTest :app:lintDebug :app:assembleDebug
./gradlew :app:installDebug

The Gradle 8.13 wrapper verifies its distribution SHA-256. Dependencies are pinned in gradle/libs.versions.toml. Native test locale rules require API 33+; replace DEVICE_ID with an explicit serial:

ANDROID_SERIAL=DEVICE_ID ./gradlew :app:connectedDebugAndroidTest

Read the code

Domain tests use virtual time. Compose collects state with collectAsStateWithLifecycle; viewModelScope owns the jobs. Raw scenario names/event messages and the detailed exercises remain in Spanish; the interface identifies this. There are no generated timestamps in the event log.

Detailed Spanish guides:

Checks and limits

The suite contains 10 JVM tests and 4 native tests. Verification records dated runs, screenshots, audit warnings and the difference between local native coverage and hosted CI. DESIGN.md explains the interface.

Spanish resources have an English fallback. No physical-device, formal accessibility, optimized-release or store result is claimed. Existing licenses and font/dependency attribution remain in third-party notices.

About

Interactive Kotlin Coroutines and Flow examples for Android: cancellation, structured concurrency and error handling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages