Use coroutines in common Android use cases quiz

  1. What are the benefits of using coroutines?

    Choose as many answers as you see fit.

  2. What can call a function marked with the suspend modifier without causing a compile error?

    Choose as many answers as you see fit.

  3. What is the recommended CoroutineScope to use in ViewModel to launch UI-related coroutines?

  4. To specify where a coroutine should run, which of the following are the three predefined dispatchers you can choose from?

    Choose as many answers as you see fit.

  5. Fill-in-the-blanks

    Enter one or more words to complete the sentence.

    To use coroutines with WorkManager, extend ___ and override doWork(), which is a suspending function.

  6. Fill-in-the-blanks

    Enter one or more words to complete the sentence.

    When using the Room library in your app, add the ___ keyword to your DAO methods so that they can be safely called from the main thread.

  7. For testing coroutines, which of the following statements are true about the runBlockingTest function?

    Choose as many answers as you see fit.