Exploring How the Activity Lifecycle Responds to User Actions

Three lifecycle functions were called after GeoQuiz was launched and the initial instance of MainActivity was created: onCreate(Bundle?), onStart(), and onResume() (Figure 3.7). Your MainActivity instance is now in the resumed state (in memory, visible, and active in the foreground).

As you continue through the book, you will override the different activity lifecycle functions to do real things for your application. When you do, you will learn more about the uses of each function. For now, have some fun familiarizing yourself with how the lifecycle behaves in common usage scenarios by interacting with your app and checking out the logs in Logcat.

Temporarily leaving ...

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.