Releasing heavy resources when the activity is no longer visible should be done in:

  1. onStop()
  2. onRestart()
  3. onCreate()
  4. onStart()
Answer

A) onStop()

onStop() is called when the activity is not visible.

Computer Science MCQ · More Android OS: Architecture, Framework and Application Development MCQs · Practise