Saturday, July 9, 2011

Android App Basics – Activity Lifecycle

1. Android App Basics – Activity Lifecycle

As resources are limited on a mobile phone, the operating system

must be able to destroy an activity, which is not active (meaning:

in the foreground of the screen), at any time.



Therefore, every Activity has a lifecycle which is handled by the

Android operating system.



To avoid losing data or the state of an activity, you must override

lifecycle methods to save your data when your activity is paused

(not in the foreground anymore but still visible) or stopped (not

visible anymore).





No comments:

Post a Comment