Android Activity Life-cycle

First opens Activity: onCreate(),OnStart(),onResume()

User Clicks backButton(): onPause(),onStop(),onDestroy()

Navigating to another screen:

First Screen:: onPause(),onStop()

Second Screen: onCreate(),OnStart(),onResume()

Presses Backbutton in Activity2:

Second Screen: onPause(),onStop() ,onDestroy()

First Screen: onRestart(), onStart(), onResume()

User locks the device: onPause(),onStop()

Again Opens lock: onRestart(), onStart(), onResume()