how to get cpu usage from system api

by daniel » Wed, 10 Jun 2009 03:37:14 GMT


Sponsored Links
 Dear all,
     I saw emulator can show cpu usage, and now i want to get the cpu
usage by code. How can i do? can you help me?

--~--~---------~--~----~------------~-------~--~----~



how to get cpu usage from system api

by lbcoder » Wed, 10 Jun 2009 21:20:14 GMT


 install busybox, run "top".



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. SDK 2.3: Get "Multiple substitutions specified in non-positional format" error

When this string is in my strings.xml

   <string name="home_activity_header_name">%s %s</string>

I get this error when compiling the source-code:
"error: Multiple substitutions specified in non-positional format; did
you mean to add the formatted="false" attribute"

I just upgraded to the newest tools (v 8.0.0) and downloaded the
latest SDK (2.3).
I compile under apil-leverl 8 and i tried compiling under api-level 9.

Why does this error suddenly appear?
Is there a way to get rid of it?

Thanks!

-- 

2. Child focus intercept

I am trying to disable a Layout including all its children. I am able
to intercept the click and key press events of the Layout in the
dispatchTouchEvent and dispatchKeyEvent and dispatchTrackBallEvent
methods of the layout. Thus, the children of this layout cannot
receive any clicks or key presses.But the child views can still
receive focus (by trackball or arrows on key board, but not by touch)
and their OnFocusChangedListeners are fired.

How can I prevent child views from receiving focus. Setting the
focusable of Layout is not working. Parsing all child views and
setting them to non focusable is too expensive in my case, as there
can be really complex run-time created view hierarchies .

thanks,
-vk

-- 

3. Troubleshooting some memory leaks

4. Problem move to sd card

5. how to install a file under application files folder

6. creating a Linux device driver

7. how to make a view draw itself following my finger movement