Re: [android-developers] Is it possible to wake the device with : PowerManager.WakeLock.acquire()

2010-06-18 Thread Mark Murphy
On Wed, Jun 16, 2010 at 2:54 AM, reda wrote: > I have a timer that schedule a task to run every 5 minutes. That is a mistake. Please use AlarmManager. > The question is : if the device is already in a sleep state, can I > wake up it with my wl.acquire()   ? No, but if you use AlarmManager, it c

[android-developers] Is it possible to wake the device with : PowerManager.WakeLock.acquire()

2010-06-18 Thread reda
Hi, I have a timer that schedule a task to run every 5 minutes. This task send a request to a server, so I need to be sure that CPU is on so that wifi or 3g can be used. So the first thing I do in my run() method is : PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); Po