Member-only story

Coroutines Cheat Sheet for Android Developers

Android Dev Nexus
4 min readOct 4, 2024

Hola, you lovely devs! 👩🏻‍💻

Welcome to yet another blog of our ongoing Android Interview Prep series. In this blog, we’ll be discussing about a really important concept in Android: Kotlin Coroutines. This coroutine cheat sheet serves as a quick refresher for anyone familiar with this powerful tool.

And here’s a special treat for our non-Medium members: we’re offering free access to this blog! Just follow this link — because your curiosity and passion for coding should never be limited! 😉😉

Let’s get the party started…

  1. Launching a Coroutine (launch)
  • launch is used to start a coroutine without expecting a result.
  • It’s usually used when you just want to fire and forget a task.

Example Usage:

2. Getting a Result with async

  • If you need a result from a coroutine, async is your friend.
  • async returns a Deferred object, which you can await to get the result.

--

--

Android Dev Nexus
Android Dev Nexus

Written by Android Dev Nexus

Your friendly neighborhood developers working at PayPal, turning Android fundamentals into concepts you’ll actually understand.

Responses (1)