Until Android 6 it was possible to run the linux command "top" directly on 
an Android device without special permission or root-access.
Thus I could easily get information such as memory and cpu consumption of 
running processes.
On Android 7, however, it returns an empty result.

Does anyone know an alternative way to execute this command or get this 
information in another way? 

For the memory consumption, ActivityManager.getProcessMemoryInfo(int[] 
pids) would be a good alternative, but it needs to PIDs of the processes 
and I have not yet been able to find a way to get the PID of other 
processes than those of my own app.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/6cf33d18-dc83-4ba0-b1d6-1004f3d58ce1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to