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); PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "My wake Lock"); wl.acquire() ; and the last thing I do in the run() is : wl.release() ; //Ah I would like not to release here to be sure my service will run in the next 5 minutes :P The question is : if the device is already in a sleep state, can I wake up it with my wl.acquire() ? Any help appreciated. Thanks -- 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

