~/talk

Get Ready to Duck: Coroutines with an Air Cannon

Talkat droidcon APAC 2020 · 2020-12-14..12-15· [android]
links:none on file
slides:none on file

Live code shows Kotlin coroutines controlling an IoT ping‑pong air cannon that connects via the Particle microcontroller and the Particle cloud, using Retrofit with suspend functions to fetch devices and call functions; the cannon actually fires and reports pressure. Demonstrates switching dispatchers (Dispatchers.IO), using async/await deferred for concurrent siren and fire actions, explains GlobalScope as an anti‑pattern, structured concurrency with scope/job, and proper cancellation cleanup with try/finally so the siren turns off.

AI-written summary · about

  1. 0:00Introduction to co-routines
  2. 1:09Live coding setup
  3. 2:56Retrofit and network calls
  4. 7:18Main thread walkthrough
  5. 13:58Launching the air cannon
  6. 16:07Adding the air raid siren
  7. 19:44Concurrent operations
  8. 22:15Structured concurrency
  9. 26:13Cancelling co-routines
  10. 31:39Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.