Android Activity Life Cycle





Simple straight forward explanation to android activity life cycle

Learn Android
Learn Android


When you enter your app, the life cycle flow will be like this:

onCreate() -> onStart() -> onResume()


Now if you are using an intent to move from your current Activity to the next Activity, these are the methods of the current activity that will be executed:

onPause() -> onStop()

When you come back to the same activity(e.g., using back key event), these are the methods of the current activity that will be executed:

onStart() -> onResume()

And when you exit your app, the flow goes like this:

onPause() -> onStop() -> onDestroy()

source