• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[App] Wi-Fi Keep Alive 1.4.2 - Don't let wi-fi turn off when screen goes off

Search This thread

shantzg001

Inactive Recognized Developer
UPDATE: Potential work arounds for folks having problem in sleep policies not working correctly have been put in version 1.2.0 onwards. Please redownload to test and let me know. Read this for more details.

IMPORTANT: If you are having wi-fi issues in sleep even after using this app, please let me know the following
1. Device/Phone Name and Rom version
2. What is the app version that you have?
3. Did you try all the combinations of various workarounds in the advanced options?
4. Can you please enable logging in the advanced options and send me logcat dump for this duration

I did an app to change the wi-fi sleep policy quickly so that you can control whether wi-fi is disconnected or not whenever screen turns off. What's more is that I also did a widget for it, so you can just tap on it to cycle through the various sleep policies.

I hope this can help some people out who get frustrated when their download breaks off as the screen goes down or worse, it switches to slow and expensive mobile data connection which runs your account balance down in a jiffy before you realize it..

You can look for more details on this page (and also report any bugs or suggestions):
Android Wi-Fi Keep Alive

Just try out this app by searching for "wi-fi keep alive" in market or scanning this barcode:
chart


Note: Many would wonder what would be the need of this app when we have a setting for this built-in in android. These are the reasons:
Yes, that is true but as I mentioned earlier in the thread. The reasons to do this app are:
1. Quick access. The setting for this is buried too deep and I wouldn't like to have this set to "never" (e.g.) all the time. I'd like to do it in a tap whenever I'm doing something that doesn't require me to look at the screen but wi-fi needs to be on. You can just tap on the widget and on you go. Otherwise you have most of the settings anyways in Android (for wi-fi/gps/sync/etc), why would you need widgets for them?
2. The android in-built settings don't work always. Although the app provides pretty much the same options to the user as the in-built setting provides but I'm trying to include work-arounds in the back end that would really make it work.

TODO/Coming Soon
* Configurable pinging interval
* Suggestions welcome

Known Issues:
1) Known issue with “on when plugged in” policy is that if you are already plugged in while changing anything in the app, workarounds don’t take place until you plug out and plug in again
2) This is not a known issue with the app but with wi-fi on some devices itself that it stops working on leaving it idle even if the phone is not sleeping. This is not the purview of this particular app and it might not solve it, although few folks say that this app helps in this scenario as well.
3) Some routers/settings are also known to cause issues with wi-fi in sleep. The correct pattern has not been identified yet but many people report that they can stay connected to wi-fi in sleep with some routers but with other routers, it fails. (Work Around 3 might help in such cases but not always)
4) While adding widget, the main app screen will pop-up for widget configuration. You need to choose any one policy (even if desired one already selected) otherwise widget will not be added

Notes:
1) Please press Menu key in the app and select “Help” to see details about policy and workaround options.
2) Please report any bugs here along with the above mentioned details (labeled IMPORTANT so that i can fix the issues.

Changelog:

02-August-2010 -> 1.4.2
* Better looking & smaller icons (including widget). Thanks a lot to "rori~" for designing the icons :) Do checkout his other work in the forum. He has designed a lot of nice morphs/themes etc (Note: If the new icons don't appear on existing widget, please delete the widget and add it again)
* Space optimization so that the app takes lesser space on phone.

22-July-2010 -> 1.4.1
* Fixed a bug that can cause wi-fi to keep reconnecting in quick succession in certain situations.

22-July-2010 -> 1.4.0
* Added workaround 4 (Re-associate automatically with access point if all else fails. Needs workaround 3 to be enabled)
* Support for small screens (e.g. XPeria X10 mini)
* Widget/Icons size optimizations for older Android versions
* Resource optimizations for lesser space and faster loading
* Misc. under-the-hood UI tweaks for better/consistent layouts across different screen sizes/densities/android versions.

11-July-2010 -> 1.3.0
* Added workaround 3 (Ping the router gateway regularly)
* Lot of optimizations for battery savings.
* Apply workarounds without needing to select the policy again

06-July-2010 -> 1.2.1
* Changed "Advanced options" to button instead of text
* Bug Fix for a Force Close
* More Optimizations
* Help and Info Menus (to explain options and workarounds)
* Option to disable/enable debug logging

04-July-2010 -> 1.2.0

* Added workarounds to take care of sleep policies not working on some phones
* Optimized the code a bit for faster operations
* Added Configuration screens to widgets (pops up whenever widget is added)

28-June-2010 -> 1.1.0

* Added Widget

27-June-2010 -> 1.0.0

* Initial Version
 
Last edited:
  • Like
Reactions: yani2000 and ai6908

bobtentpeg

Senior Member
Jan 18, 2010
502
16
For those that didnt know, you can set the policy in the wifi menu area by hitting menu>>advanced
 

lou2s

Senior Member
Jun 19, 2010
774
289
For those that didnt know, you can set the policy in the wifi menu area by hitting menu>>advanced

But the "never sleep" option never work for me. For example, with the setting "Never" on, when I tried to transfer file over wifi with SwiFTP, the transfer will stop at the moment the phone screen is off, and I hv to unlock the screen again to resume the transfer. Same thing happens to Market download.

I m running stock nonroot Nexus One Froyo FRF83. Solution for me now is using screebl lite and hold the phone to keep the screen on until the transfer is done... a pain in the ass.....
 

lou2s

Senior Member
Jun 19, 2010
774
289
Just installed and tried the app: I tried copying a 300MB video file from phone to PC over wifi via SwiFTP, the transfer stop a bit after the screen is off, still hv to unlock the screen to allow the transfer continue.... Thanks for the effort though, this is really bugging me and I hope at some point the "never sleep" policy will actually work.
 

shantzg001

Inactive Recognized Developer
Thanks guys, for trying out the app..yeah this setting is available pretty deep into the menus but my reason of doing this app was:
1. To make it quick (especially through widget)
2. To really make it work..
The first release essentially takes care of the first point.. However to take care of the concerns pointed out, like by lou and flybyme, I'm adding some more workarounds to it to keep wi-fi working.. I'll probably have some more news for you guys around weekend :)
 

FormelLMS

Retired Recognized Developer
Oct 28, 2009
2,647
376
Yes, thats a bad bug on NexusOne.

I can't stream Music to the phone. When screens getting off, the stream stops.
Very bad.
Make a pingtest to your phone.

With screen on, everything is fine, screen off it went crazy.
No Dev here, who can make changes to this?
 

shantzg001

Inactive Recognized Developer
Yes, thats a bad bug on NexusOne.

I can't stream Music to the phone. When screens getting off, the stream stops.
Very bad.
Make a pingtest to your phone.

With screen on, everything is fine, screen off it went crazy.
No Dev here, who can make changes to this?

I have a couple of workarounds that are working.. but I still need to do a lot of work to make them optimal. Will be released soon in 1.2.0
The other thing that compounds the problem is that apart from the phone itself, there is a lot dependent on the routers as well.. That part I'm still trying to figure out a workaround for..
 

Gr8gorilla

Senior Member
Jan 29, 2010
924
105
Atlanta, Ga
couldn't you manipulate the stay awake while charging set up to make the phone stay awake forever? That works, I know if I have that checked and the phone plugged in the screen never turns off!
 

Lou2serious

Senior Member
Jun 9, 2009
292
2
Orange county
couldn't you manipulate the stay awake while charging set up to make the phone stay awake forever? That works, I know if I have that checked and the phone plugged in the screen never turns off!
Your right, this is a standard feature android has had for a long time. Basically going to setting>wireless & networks>Wi-Fi settings>press menu> select advanced>Wi-Fi sleep policy> select from these options "when screen turns off", "never when plugged in", "never"

Of course by selecting "never" your wifi never disconnects while your phone sleeps.
 
Last edited:

shantzg001

Inactive Recognized Developer
couldn't you manipulate the stay awake while charging set up to make the phone stay awake forever? That works, I know if I have that checked and the phone plugged in the screen never turns off!

Yes, that would work but:
1. It won't work for times when your phone is not plugged
2. It slows down the charging rate

Your right, this is a standard feature android has had for a long time. Basically going to setting>wireless & networks>Wi-Fi settings>press menu> select advanced>Wi-Fi sleep policy> select from these options "when screen turns off", "never when plugged in", "never"

Of course by selecting "never" your wifi never disconnects while your phone sleeps.
Yes, that is true but as I mentioned earlier in the thread. The reasons to do this app are:
1. Quick access. The setting for this is buried too deep and I wouldn't like to have this set to "never" (e.g.) all the time. I'd like to do it in a tap whenever I'm doing something that doesn't require me to look at the screen but wi-fi needs to be on. Otherwise you have most of the settings anyways in Android (for wi-fi/gps/sync/etc), why would you need widgets for them?
2. The settings mentioned don't work always. Although the app provides pretty much the same options to the user as the in-built setting provides but I'm trying to include work-arounds in the back end that would really make it work.
Will put this in the OP as well..
 

z3ntn3l

Senior Member
Oct 3, 2008
104
1
Yes, thats a bad bug on NexusOne.

I can't stream Music to the phone. When screens getting off, the stream stops.
Very bad.
Make a pingtest to your phone.

With screen on, everything is fine, screen off it went crazy.
No Dev here, who can make changes to this?
+1 here with that Problem on Nexus One.

I tried many ROMs (CM, MCR......), every Radio and some "WiFi Alive"-Apps on the Market (They are developed for Android 1.5) and NOTHING changed the Situtation:

Music-Streams always disconnect when the Phone goes into Stand-by. It's horrible. There are some Posts from different People about this Problem in the ROM-Threads from Cyanogen & Co but it seems most of the People dont have this Issue so its not recognized by the Devs?
 

DeeDroid

Senior Member
Jan 23, 2009
67
12
Karlsruhe
Same problem here. I'm trying to stream shoutcast radio stations with Xiialive, but it's buffering all the time as soon as the screen turns off :-( ...htc desire
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    UPDATE: Potential work arounds for folks having problem in sleep policies not working correctly have been put in version 1.2.0 onwards. Please redownload to test and let me know. Read this for more details.

    IMPORTANT: If you are having wi-fi issues in sleep even after using this app, please let me know the following
    1. Device/Phone Name and Rom version
    2. What is the app version that you have?
    3. Did you try all the combinations of various workarounds in the advanced options?
    4. Can you please enable logging in the advanced options and send me logcat dump for this duration

    I did an app to change the wi-fi sleep policy quickly so that you can control whether wi-fi is disconnected or not whenever screen turns off. What's more is that I also did a widget for it, so you can just tap on it to cycle through the various sleep policies.

    I hope this can help some people out who get frustrated when their download breaks off as the screen goes down or worse, it switches to slow and expensive mobile data connection which runs your account balance down in a jiffy before you realize it..

    You can look for more details on this page (and also report any bugs or suggestions):
    Android Wi-Fi Keep Alive

    Just try out this app by searching for "wi-fi keep alive" in market or scanning this barcode:
    chart


    Note: Many would wonder what would be the need of this app when we have a setting for this built-in in android. These are the reasons:
    Yes, that is true but as I mentioned earlier in the thread. The reasons to do this app are:
    1. Quick access. The setting for this is buried too deep and I wouldn't like to have this set to "never" (e.g.) all the time. I'd like to do it in a tap whenever I'm doing something that doesn't require me to look at the screen but wi-fi needs to be on. You can just tap on the widget and on you go. Otherwise you have most of the settings anyways in Android (for wi-fi/gps/sync/etc), why would you need widgets for them?
    2. The android in-built settings don't work always. Although the app provides pretty much the same options to the user as the in-built setting provides but I'm trying to include work-arounds in the back end that would really make it work.

    TODO/Coming Soon
    * Configurable pinging interval
    * Suggestions welcome

    Known Issues:
    1) Known issue with “on when plugged in” policy is that if you are already plugged in while changing anything in the app, workarounds don’t take place until you plug out and plug in again
    2) This is not a known issue with the app but with wi-fi on some devices itself that it stops working on leaving it idle even if the phone is not sleeping. This is not the purview of this particular app and it might not solve it, although few folks say that this app helps in this scenario as well.
    3) Some routers/settings are also known to cause issues with wi-fi in sleep. The correct pattern has not been identified yet but many people report that they can stay connected to wi-fi in sleep with some routers but with other routers, it fails. (Work Around 3 might help in such cases but not always)
    4) While adding widget, the main app screen will pop-up for widget configuration. You need to choose any one policy (even if desired one already selected) otherwise widget will not be added

    Notes:
    1) Please press Menu key in the app and select “Help” to see details about policy and workaround options.
    2) Please report any bugs here along with the above mentioned details (labeled IMPORTANT so that i can fix the issues.

    Changelog:

    02-August-2010 -> 1.4.2
    * Better looking & smaller icons (including widget). Thanks a lot to "rori~" for designing the icons :) Do checkout his other work in the forum. He has designed a lot of nice morphs/themes etc (Note: If the new icons don't appear on existing widget, please delete the widget and add it again)
    * Space optimization so that the app takes lesser space on phone.

    22-July-2010 -> 1.4.1
    * Fixed a bug that can cause wi-fi to keep reconnecting in quick succession in certain situations.

    22-July-2010 -> 1.4.0
    * Added workaround 4 (Re-associate automatically with access point if all else fails. Needs workaround 3 to be enabled)
    * Support for small screens (e.g. XPeria X10 mini)
    * Widget/Icons size optimizations for older Android versions
    * Resource optimizations for lesser space and faster loading
    * Misc. under-the-hood UI tweaks for better/consistent layouts across different screen sizes/densities/android versions.

    11-July-2010 -> 1.3.0
    * Added workaround 3 (Ping the router gateway regularly)
    * Lot of optimizations for battery savings.
    * Apply workarounds without needing to select the policy again

    06-July-2010 -> 1.2.1
    * Changed "Advanced options" to button instead of text
    * Bug Fix for a Force Close
    * More Optimizations
    * Help and Info Menus (to explain options and workarounds)
    * Option to disable/enable debug logging

    04-July-2010 -> 1.2.0

    * Added workarounds to take care of sleep policies not working on some phones
    * Optimized the code a bit for faster operations
    * Added Configuration screens to widgets (pops up whenever widget is added)

    28-June-2010 -> 1.1.0

    * Added Widget

    27-June-2010 -> 1.0.0

    * Initial Version