Reputation: 10545
When I used getRunningProcesses(), I got about 20~30 processes.
However, when I used the TOP command in an Android terminal, I saw more than 80 processes. I found some processes owned by "root" have zero memory consumption.
What cause the differences? Are some of the processes found by TOP not currently running?
Upvotes: 0
Views: 170
Reputation: 24820
top
shows all processes running on the operating system. Whereas ActivityManager.getRunningAppProcesses
shows only processes started by Android.
Root owned processes are usually started by linux kernel for event handling , where as processes returned by ActivityManager.getRunningAppProcesses
are only those started by Android framework
Upvotes: 1
Reputation: 2387
Android runs a lot of services. Those services you do not want to close because Android needs them to run. Here is some more information about services:
Also read Android Developers - Processes and Threads.
Upvotes: 0