Android

Android Application Lifecycle
Previous Home Next

In Android, the applications are run as a separate Linux process. So the application lifecycle is closely related to the process lifecycle. The application process lifecycle is handled by the system depending on the current system memory state.

n case of low memory, the Android system kills some less important process. The process importance is decided depending on the state of the process components.

The process types depending on the importance are as follows

 

  1. Foreground process: A foreground process is the application process with which the user is currently interacting. The process is considered to be foreground if its Activity is at the top of the Activity stack or its Service is executing callback functions like onCreate(), onStart() or onDestroy() methods.

  2. Visible Process: A visible process is the process which has an Activity visible to the user

  3. Service Process: Service process contains a Service for which startService method is called and the service is running.

  4. Background Process: The background process does not have any visible activities to the user.

  5. Empty Process: Empty process is the one that does not have any active application components. These processes are kept on for caching purpose

It is important that application developers understand lifecycle of the application process. Not using these correctly can result in the system killing the application’s process while it is doing important work.

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: