Professional Documents
Culture Documents
03 Hands-On Activity 1
03 Hands-On Activity 1
Hands-on Activity
Understanding the Activity Life Cycle
Objectives:
Software Requirements:
Android Studio 3.3 or higher
Java Development Kit (JDK) 8
Internet Connection
Procedure:
1. Create a folder named LastName_FirstName in your local drive. (ex. Reyes_Mark)
2. Create a new project. Name the app LifeCycle.
3. The onCreate() method is already provided upon creating a new project. Add a toast to show that
this method is invoked. See sample statement below.
Toast.makeText(getApplicationContext(), "Created!", Toast.LENGTH_SHORT).show();
4. Launch the application to check if the toast will appear. If there is no existing Android Virtual Device
(AVD) or emulator, create one by going to Tools > Android > AVD Manager.
5. Define the other methods to exhibit the different phases of the life cycle of an activity. All methods
should be protected, void and with empty parameters. See sample below.