Changes

Jump to: navigation, search
no edit summary
== Android Process States ==
Processes host applications and applications are made up of components. Within an Android system, the current state of a process is defined by the highest-ranking active component within the application that it hosts. As outlined in Figure 810-1, a process can be in one of the following five states at any given time:
[[Image:android_studio_process_state.png|Android Process state diagram]]
Figure 810-1
== The Activity Stack ==
For each application that is running on an Android device, the runtime system maintains an Activity Stack. When an application is launched, the first of the application’s activities to be started is placed onto the stack. When a second activity is started, it is placed on the top of the stack and the previous activity is pushed down. The activity at the top of the stack is referred to as the active (or running) activity. When the active activity exits, it is popped off the stack by the runtime and the activity located immediately beneath it in the stack becomes the current active activity. The activity at the top of the stack might, for example, simply exit because the task for which it is responsible has been completed. Alternatively, the user may have selected a “Back” button on the screen to return to the previous activity, causing the current activity to be popped off the stack by the runtime system and therefore destroyed. A visual representation of the Android Activity Stack is illustrated in Figure 810-2:
[[Image:android_studio_activity_stack.png|The Android activity stack diagram]]
Figure 810-2

Navigation menu