Is there any way to monitor CPU usage of a java thread from android? It doesn't seem that android supports the ThreadMXBean or the ManagementFactory. What is available? I noticed that Process offers some very limited information, but I don't think that I can narrow that down to actual thread usage -- it's just reporting process-level information.
On Jul 15, 1:10 pm, Dianne Hackborn <[email protected]> wrote: > There is no such concept as a "high priority application running which might > need the entire CPU," sorry. > > On Wed, Jul 15, 2009 at 6:06 AM, sukumar bhashyam < > > > > > > [email protected]> wrote: > > Hello, > > I'm trying to develop a service, which needs to be run in background as a > > low priority task and does some complex processing . I need to gracefully > > quit my service when their is a resource shortage( like CPU running low on > > memory). Was there any APIs available to know the CPU resource usage ?. > > Objectives of my service is to - > > 1. Exit service when a high priority application(s) is running and which > > might need entire CPU resources. > > 2. Should store my states before onDestroy() of my service is called. > > > I'm planning to use CPU resource usage api's in service to > > check periodically the CPU load and quit the service if CPU load exceed a > > threshold(80 %) after storing states. Please let me know of any better way > > of handling the objectives of my service stated above. Thanks. > > > Regards, > > Sukumar. > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

