In Kotlin, withContext(Dispatchers.IO) ... is used to:

  1. Restart the activity
  2. Create a notification
  3. Update the UI
  4. Run blocking network/disk code on a background thread
Answer

D) Run blocking network/disk code on a background thread

Dispatchers.IO is optimised for I/O work off the main thread.

Computer Science MCQ · More Maps and Consuming Web Services over HTTP MCQs · Practise