lifecycleScope.launch is used because:

  1. It needs no internet
  2. The coroutine is cancelled automatically when the activity is destroyed
  3. It replaces the adapter
  4. It runs on a different phone
Answer

B) The coroutine is cancelled automatically when the activity is destroyed

lifecycleScope is bound to the activity's lifecycle.

Computer Science MCQ · More Lab: Displaying Data from an API MCQs · Practise