O'Reilly logo

Pro Android 4 by Satya Komatineni, Dave MacLean

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Component and Process Lifetimes

As you have seen so far, as messages get dropped on the queue, the main thread comes around to process those messages. What would happen to the messages that are pending in the main queue if you were to hit the Back button or the Home button? What would happen to the worker thread that is executing? We will explain what happens by considering the life cycle of each of the Android components.

Although we discuss the component life cycles here, please note that this is not a full discussion of those life cycles. The activity life cycle is already described with the help of a diagram in Chapter 2. Similarly, the service life cycle is elaborated on in Chapter 15. The discussion here is limited to addressing only those ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required