[android-developers] Re: Obtaining/calculating process CPU usage.

2009-05-07 Thread David Turner
On Thu, May 7, 2009 at 7:34 AM, Sachin pandhare sachinpandh...@gmail.comwrote: Hello Dianne, Which functionality may break in future releases? Is it executing the command using runtime? String cmd = top -n 1; process = runtime.exec(cmd); the format, or even the availability of top is very

[android-developers] Re: Obtaining/calculating process CPU usage.

2009-05-06 Thread Sachin pandhare
Hello Dianne, Which functionality may break in future releases? Is it executing the command using runtime? String cmd = top -n 1; process = runtime.exec(cmd); or something else in this code segment? thanks, Sachin On May 5, 9:44 pm, Dianne Hackborn hack...@android.com wrote: This is very

[android-developers] Re: Obtaining/calculating process CPU usage.

2009-05-05 Thread Donald_W
So is there any possibility to calculate CPU usage? On May 4, 9:19 pm, Dianne Hackborn hack...@android.com wrote: There isn't a supported API for this. On Mon, May 4, 2009 at 7:02 AM, Donald_W wojcik.to...@gmail.com wrote: Hello, How can I get/calculate current process CPU usage?

[android-developers] Re: Obtaining/calculating process CPU usage.

2009-05-05 Thread Dianne Hackborn
There is no supported API for this. I am not helping people find and use unsupported APIs, and then having to deal with their apps breaking when we update the platform. On Mon, May 4, 2009 at 11:43 PM, Donald_W wojcik.to...@gmail.com wrote: So is there any possibility to calculate CPU usage?

[android-developers] Re: Obtaining/calculating process CPU usage.

2009-05-05 Thread Donald_W
Well I thought rather of any calculations using some process data. Anyway thanks for help. BR, Tomek On May 5, 9:20 am, Dianne Hackborn hack...@android.com wrote: There is no supported API for this.  I am not helping people find and use unsupported APIs, and then having to deal with their

[android-developers] Re: Obtaining/calculating process CPU usage.

2009-05-05 Thread rezar
You can use output of the top command, for your process Here is what I did: Runtime runtime = Runtime.getRuntime(); Process process; String res = -0-; try { String cmd = top -n 1;

[android-developers] Re: Obtaining/calculating process CPU usage.

2009-05-05 Thread rezar
I though I sent it once, but Use out put of top linux command with java Runtime. On May 4, 4:02 pm, Donald_W wojcik.to...@gmail.com wrote: Hello, How can I get/calculate current process CPU usage? ActivityManager provides method that returns a list of all active processes (list of

[android-developers] Re: Obtaining/calculating process CPU usage.

2009-05-05 Thread Dianne Hackborn
This is very likely to break in future platform updates. On Tue, May 5, 2009 at 7:53 AM, rezar rraw...@gmail.com wrote: You can use output of the top command, for your process Here is what I did: Runtime runtime = Runtime.getRuntime(); Process process;

[android-developers] Re: Obtaining/calculating process CPU usage.

2009-05-04 Thread Dianne Hackborn
There isn't a supported API for this. On Mon, May 4, 2009 at 7:02 AM, Donald_W wojcik.to...@gmail.com wrote: Hello, How can I get/calculate current process CPU usage? ActivityManager provides method that returns a list of all active processes (list of RunningAppProcessInfo), but that class