Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Develop an app to document the lifecycle of an \"activity\" For each callback ev

ID: 3881171 • Letter: D

Question

Develop an app to document the lifecycle of an "activity" For each callback events (onCreate(), onStart() ...), record what callback event was triggered in the log(use Log.d): the message that is written to log should be defined in "strings.xml" and getResources.getString() should be used to retrieve the message Implement onSavelnstanceState and onRestorelnstanceState - to track the number of times onSavelnstanceState is being called, in onRestorelnstanceState, print the value to the log file Tag for "Log" statement should also be defined in strings.xml and set using getResources.getString() Perform different actions like rotating the screen orientation, back button, home button, restore this lat app - analyze how your actions impact the activity lifecycle. Submit the following files in a ZIP file (LastName_FirstName_CSCI235Lab2.zip): A text file with "logcat" statements - remember to filter "logcat" statements to just your tag - you can use "logtag" to filter it (one of the video tutorial shows how to filter it) Activity.java Strings.xml

Explanation / Answer

Answer: See the code below:

Steps:

1. Launch Android Studio

2. In Studio, create a new Android Studio Project for phones and tablets.

3. Set application name. In our case, it is "Activity_documentation". Create a Basic activity.

4. Set Main activity name. In our case, it is "AppDocumentationActivity".

5. Edit AppDocumentationActivity.java and strings.xml as rereqired.

-------------------------------

AppDocumentationActivity.java: See code below:

---------------------------------------

----------------------------------------

strings.xml:

---------------------------------------

----------------------------------------