Q2

Question 2

Create an application to display various android activity lifecycle phases.

App Insights:

In the basic Empty Activity application template, wrote onStart(), onRestart(), onResume(), onPause(), onStop(), and onDestroy() methods to print the lifecycle phase to console.

Browse Source Code

Code

Output

Studio Screenshot (Before Launch) (1/12)
App Screenshot (Before Launch) (2/12)
Studio Screenshot (After Install and Launch) (3/12)
App Screenshot (Before Launch) (4/12)
Console Output for Launch Activity (5/12)
Studio Screenshot (After Pressing Back Button) (6/12)
Console Output on Pressing Back Button (7/12)
Studio Screenshot (On Resuming App) (8/12)
App Screenshot (Before Launch) (9/12)
Console Output on Resuming App (10/12)
Studio Screenshot (On Closing App) (11/12)
Console Output on Closing App (12/12)

Last updated