On Tue, Oct 23, 2012 at 6:46 AM, LouieLiu <[email protected]> wrote:
> I got it. Change WiFi sleep policy to NEVER.
>
> Settings.System.putInt(getContentResolver(),
> android.provider.Settings.System.WIFI_SLEEP_POLICY,android.provider.Settings.System.WIFI_SLEEP_POLICY_NEVER);
>

Of course you cannot rely on this setting being set to NEVER on all devices.
If you really need to this while the phone screen is off, you need to
use a WakeLock.

-- 
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

Reply via email to