Monday, October 22, 2012

Re: [android-developers] Re: Android cuts off HttpURLConnection when screen timeout occurs.

On Tue, Oct 23, 2012 at 6:46 AM, LouieLiu <ckliu.email@gmail.com> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate