onStart()
is called when activity resumes from stopped state. For example, if you have activity A and starts activity B from it, then activity A will be paused (onPause()
) and then stopped (onStop()
) and moved to back stack. After this, if you press Back into your activity B, B will be paused(onPause()
), stopped (onStop()
) and destroyed(onDestroy()
), and activity A will be restored from back stack, started (onStart()
) and resumed(onResume()
). As you can see, system will not call onCreate()
for A again.
How to use onStart()
? For example, you should unregister listeners for GPS, sensors, etc in onStop()
and register again in onStart()
. If you register it in onCreate()
and unregister in onDestroy()
, then GPS service will work always and it will drain battery.