Service runnning while PowerManager decides to sleep ?

by Dianne Hackborn » Sat, 21 Nov 2009 04:10:46 GMT


Sponsored Links
 If you don't hold a wake lock, you can't count on the CPU running.




>



Service runnning while PowerManager decides to sleep ?

by Derek » Sat, 21 Nov 2009 04:22:40 GMT


 Thanks for the answer Dianne.

So, is it a good idea to acquire a WakeLock at the beginning of the
service and release it at the end just after setting the PendingIntent
through AlarmManager ?

Also, is it possible to simulate CPU to go off with Emulator ? or
forcing CPU to go off with real device connected to DDMS through USB ?

Cheers.




> >


Sponsored Links


Other Threads

1. cupcake build error

It looks like I'm missing a change even after repo sync. I get:

development/apps/Development/AndroidManifest.xml:74: ERROR Error: String 
types not allowed (at 'configChanges' with value 
'keyboard|keyboardHidden|navigation|orientation').

when building. Searching for configChanges shows several placed that 
they are defined as int fields.

./frameworks/base/core/res/res/values/public.xml:  <public type="attr" 
name="configChanges" id="0x0101001f" />
./frameworks/base/api/2.xml:<field name="configChanges"
./frameworks/base/api/2.xml:<field name="configChanges"
./frameworks/base/api/2.xml:<parameter name="configChanges" type="int">
./frameworks/base/api/1.xml:<field name="configChanges"
./frameworks/base/api/1.xml:<field name="configChanges"
./frameworks/base/api/1.xml:<parameter name="configChanges" type="int">
./frameworks/base/api/current.xml:<field name="configChanges"
./frameworks/base/api/current.xml:<field name="configChanges"
./frameworks/base/api/current.xml:<parameter name="configChanges" 
type="int">
./frameworks/base/api/3.xml:<field name="configChanges"
./frameworks/base/api/3.xml:<field name="configChanges"
./frameworks/base/api/3.xml:<parameter name="configChanges" type="int">


--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. two threads, the main closes the DB but the second is still running and need to use the DB!

I would recommend having a singleton that all of the clients go through,
which takes care of keeping the database open as long as there are clients
of it.






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

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

3. Android x86 community website launched!

4. cupcake minor issues

5. Screen Orientation change performance Question

6. Radio button items's text not visible in Dialog

7. Theme on a preferences screen