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. Android emulator problems

So, I've been doing the android tutorials and every time I try to load
the emulator it gets to the waiting for HOME step and then cancels.
It will load the emulator, but it will only get to the screen with
ANDROID across.

I rebooted my computer redid the tutorials and cleaned the projects
and tried again.  This time it worked after a while, but when the
emulator actually loaded, my app wasnt on the device.

Can someone please help me out, I'm not sure if i messed up
configuring eclipse or what I'm doing wrong.  Thank you

-- 

2. Video code plays on one android device not on another.

Hi I am using the MediaPlayer API (1.5 version) in android.  I have
successfully gotten the Motorola Droid on Verizon to work well with
the video both in terms of positioning and getting the picture to
appear at all.  However, the same code, using the same application
with the same video source, does not display the video on EVO 4G on
Sprint.

The video documentation is very limited, and I struggled for 2 weeks
to get the Droid to work.  What I noticed was that after the surface
is allocated, and after MediaPlayer.prepareAsync() and its
corresponding listener onPrepare indicates that it is ready, I check
the value of MediaPlayer.getVideoHeight and MediaPlayer.getVideoWidth,
and on the EVO they are 0,0, whereas on the Droid it is the size of
the video, that is non-zero.  So I hardcoded some values instead of
the 0,0, and  I got at least a black background on my display where
the video should be, but no video yet.

 Are there documented difference between android devices that I need
to be aware of in terms of handling video?  I was hoping that by
figuring out one device would allow me to use the same code across all
devices.

Any suggestions on this problem will be appreciated.

-- 

3. Upgrade to Android 2.2

4. How to install ZIP files to Xperia X10

5. Ground or Tile overlays possible for Google Map ?

6. Accessing Phone Conversation Audio Stream

7. filtering onMap object depending on their OnScreenCorrdinates