Re: [android-developers] WifiLock and WakeLock regarding large downloads

2011-03-29 Thread Sebastian Roth
Hold on a second here: "device policy of shutting down wifi and switching to 3g after 15 minutes of screen off" -> that means if I'm at home sleeping (with WiFI enabled), the device will not use WiFi but 3G over night? Can you confirm this? Where is this specified? On Tue, Mar 29, 2011 at 10:41

Re: [android-developers] WifiLock and WakeLock regarding large downloads

2011-03-28 Thread Irfan Sheriff
On Mon, Mar 28, 2011 at 8:06 PM, Mark Carter wrote: > Thanks Irfan. Doesn't the CPU need to be awake the whole time anyway? If it > isn't, then won't the download stop/pause as soon as the CPU sleeps? If > that's true, then isn't the WakeLock essential? If you have initiated a download and the

Re: [android-developers] WifiLock and WakeLock regarding large downloads

2011-03-28 Thread Irfan Sheriff
WifiLock keeps the device on Wifi and prevents the device policy of shutting down wifi and switching to 3g after 15 minutes of screen off. Holding a wifilock should normally be sufficient to complete a download since even in the power optimized state (screen off), the device should still wake up o

[android-developers] WifiLock and WakeLock regarding large downloads

2011-03-28 Thread Mark Carter
>From what I gather, WifiLock and WakeLock work completely independently and if you are downloading a large file over Wifi then you will need to acquire both locks?? Ideally, you would want something like this: 1. Acquire partial WakeLock 2. Preparing to download large file, check whether on Wi