I want to get the overall CPU usage on Android, similar to what Windows' Task Manager does. I can parse the output of the top
program included in Android, but if there is a API call that does the same thing, it would be better.
Any pointers?
I want to get the overall CPU usage on Android, similar to what Windows' Task Manager does. I can parse the output of the top
program included in Android, but if there is a API call that does the same thing, it would be better.
Any pointers?
You can reference the "DevTools" project.
Using ActivityManager you can get lots information, such as ActivityManager.RunningAppProcessInfo, ActivityManager.RunningTaskInfo, ...
But I am not sure the result will same as 'top' command.
see ActivityManager