Service runnning while PowerManager decides to sleep ?

by Dianne Hackborn » Sat, 21 Nov 2009 05:40:59 GMT

Sponsored Links
 You should hold a wake lock only when you need to make sure the CPU will
continue running.  If it is during the entire time your service runs until
it schedules an alarm, then that is it, but please keep this as short as
possible since this is one of the things that can have a significant impact
on battery life.

You need to do this on a device.  You need to do this on a device, anyway,
so you have some idea of how you are actually impacting the battery.

> > >

Other Threads

1. Android and Windows Host file

I am trying to develop an Android app that connects to a tomcat web
service and want to be able to load it off my local machine.

In my host file on my windows dev machine I have the service's URL
defined and tomcat running, however when i try to load the page it
says it cannot find it. I read that the Android emulator is not setup
to use the host file. Is there a way I can get it to use the host
file, or add the url entry to android so it will connect to the server
hosted on the same machine the emulator is hosted on.

Any ideas?


2. precision of alarms using RTC_WAKEUP

I am using the AlarmManager to set alarms with RTC_WAKEUP.  And they

Some of the alarms are set for times just a few hours in the future;
others are set for days in the future.

My problem is that some alarms (maybe 20% of them) fire late, up to 15
minutes late.  Others are right on time.  Is this expected behavior?
Has anyone else noticed this?

A related question: if the user powers off and on his/her device, it
seems that the alarms that were set prior to the off/on don't fire.
Is that expected behavior as well?


3. How to create bitmap directly from byte array?

4. RIL Android Dev Phone 1 OS

5. Hidden HTC Registry Edits for the G1? (Panorama camera feature etc.?)

6. why cannot stop my thread?

7. Ouch the dev 1 is too expensive!!! (outside of the US)