Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

6. Opening and Closing an Application and Saving Data

Chapter 6. Opening and Closing an Application and Saving Data

The difference between a bad programmer and a good one is whether he considers his code or his data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships.

Linus Benedict Torvalds

In Android, every application, also called an activity, is given a unique user ID and runs in its own process. The system—more specifically, the Activity Manager—manages the life cycle of applications and provides a common activity stack.

The application life cycle has three states: active, paused, and stopped. The Activity Manager keeps track of the list of application processes currently running, in order, from newest to oldest. If memory is needed, the oldest application is terminated first. It may receive an event first or be terminated at once.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint