0% found this document useful (0 votes)
107 views

Facts About Android Processes

This document discusses Android process management. It explains that Android runs each application in its own process and handles process management. Processes can be suspended instead of killed to save resources. Android may kill processes if low on memory. There are four types of processes: foreground, visible, service, and cached. Foreground processes are required for the user's current task, while cached processes have low priority and Android will kill them first if low on memory.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views

Facts About Android Processes

This document discusses Android process management. It explains that Android runs each application in its own process and handles process management. Processes can be suspended instead of killed to save resources. Android may kill processes if low on memory. There are four types of processes: foreground, visible, service, and cached. Foreground processes are required for the user's current task, while cached processes have low priority and Android will kill them first if low on memory.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Facts about Android

Processes
• Much of the time, each Android application runs in its own linux
process.

• Android handles the process management, not the application.

• Android tries to suspend processes, rather than killing them, if


they’re not in use. This saves power and CPU usage, as the
process can be reactivated if needed without creating from scratch.

• Android may kill a process if it starts to run out of free memory.

• An Android application has essential building blocks, called


components. The components and their states greatly affect the
lifetime of an application.
Classification of Processes
• Foreground process - It’s required for what the user is doing. E.g. texting. A
process is considered as one if (any):

• Its Activity component is running atop the screen with the user interacting with
it.

• Its BroadcastReceiver component is running.

• Its Service component is running and executing code.

• Visible process - It’s a process which may be doing some work for the user. E.g.
performing search in the filesystem. A process is visible if (any):

• Its Activity component is visible on-screen but is not on the foreground (paused).

• Its Service component is running as a foreground service. E.g. Live wallpaper,


input method service, etc.
• Service process - It’s responsible for tasks which the user
cannot directly see but cares about. E.g. checking for updates,
data upload/download, etc. It has to have a running Service
component to be classified as a service process. Long running
services processes may be demoted and given less priority.

• Cached process - It’s a process with low priority, possibly


having an activity that may have no direct impact on user
experience. Its Activity component[s] are stopped, and not
visible to the user. Android will always seek to kill such
processes if memory is needed elsewhere. Android keeps
cached processes in memory to improve user experience,
reduce power consumption, CPU usage, etc. It’s often less
expensive to reactivate a process in memory rather than
spawning one from scratch.

You might also like