Wi-Fi Keep Alive
Blog | Tech Blog | Secure Coding | Twitter | RSS Feed | Get Email Updates
—-
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 below for more details.
Latest Version: 1.4.2 (See below for change log history)
Are you frustrated by your downloads getting broken or worse, switching over to slow and expensive mobile data connections like GPRS/Edge/3G when your wi-fi connection gets dropped by your Android phone when the screen goes off? If yes, then look no further. Here is my app that allows you to choose your desired Wi-Fi Sleep policy. You can choose from the following options:
1. Default -> This means that wi-fi will turn off whenever the screen goes off.
2. Wi-Fi On on sleep if plugged -> This means that if your phone is plugged into a USB slot or wall charger, then wi-fi will not turn off even when the screen goes off.
3. Wi-Fi Never goes off -> This means that your wi-fi will not shut down whenever screen turns off, even if you are not plugged into USB/charger.
Please note that this app just changes the sleep policy and does not change the wi-fi state by itself. You can still control wi-fi turning on/off manually.
Few folks were having issues with their devices that the inbuilt handling of this wi-fi sleep policy in their phones wasn’t being done properly by Android. To take care of this, there are a few workarounds added to the app now which can be accessed by clicking on “Advanced Options” on the configuration screen (This configuration screen can be accessed by launching the app or it will also show up whenever you add a widget). Enable any one or all of the workarounds mentioned in advanced settings depending on what works best on your device as there are lot of variants due to different manufacturers and different Android versions on different phones. Please also note that you should enable these workarounds only if the app is not working fully well for you without enabling them as some of them can cause your battery to drain a bit faster.
Another thing to note is that I’ve added a widget for it. So, you can install the app and instead of having to open the app and change the setting every time, you can just add its widget to your home screen (Long press on home screen. Then choose Widgets->Wi-Fi Keep Alive). Now, you can just touch it whenever you want to change your setting and it will automatically cycle through the options listed above.
Dark/Sepia Widget Icon -> Default setting
Purple Widget Icon -> Wi-Fi On on sleep if plugged
Green Widget -> Wi-Fi never goes off
Please try it out and let me know if you face any issues or have any suggestions
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 these details 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” from xda-developers to design the icons
(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
* Bug Fix for a Force Close
* More Optimizations
* Help and Info Menus
* 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
Download:
Search for “Wi-Fi Keep Alive” in Android marketplace or simply scan the below QR code:
© Shantanu Goel | Wi-Fi Keep Alive
|
Liked this post? Get FREE Updates Subscribe to RSS feed |






This post has 17 comments
June 30th, 2010
Nice lil app, but it seens that it doesnt work on my Nexus 1 (FRF83 with MCR aditions). Regardless of your app or spare parts settings, wifi goes off after the screen times out. What system have you tried on?
July 10th, 2010
There’s a known bug with wifi sleep policy on the N1 and other devices with broadcom wifi chips where on some configurations, wifi sleep policy is ignored.
http://www.google.com/support/forum/p/android/thread?tid=01a47ff5b0a92d52&hl=en&fid=01a47ff5b0a92d5200048abc4a80fbf2
June 30th, 2010
@takeshi: I have tested it on my nexus one with FRF50. Some other users with FRF83 have mentioned the same problem to me. I’m adding some workarounds that should potentially fix it for you. Update will be coming around weekend if I can get enough time out from work
July 17th, 2010
Thanks for making the app, I’m testing it now. Could you please update your post with a description of the “workarounds”? Thanks!
July 17th, 2010
Nevermind, I found a description of those options in the Settings menu on the Advanced Options screen.
The app is not working for me though.
Device: Nexus One (T-Mobile version), running official Froyo Build FRF91. Not rooted, or otherwise modified.
App version: 1.2.1
Workaround Combinations Tried: All six.
Logcat: Turned on Debug mode but no idea how to send this.
I have a very common and popular Linksys WRT54GL router, with DD-WRT firmware installed. I also tried changing the wireless security algorithm from TKIP to AES and neither works. I’m totally and absolutely lost.
I got my Nexus One just a few days ago, and am running vanilla Froyo FRF91. I couldn’t be a more typical Nexus One user. If I’m having this problem, then a lot of others will be having it too for sure.
July 18th, 2010
It is not working for my Samsung Eclair 2.1 either. The Notification showing Wifi but cant ping to the android ip. Wifi can remain connected only when I have the charging cable connected. Maybe if you can trick Android that phone is charging, wifi could always stay connected.
July 22nd, 2010
Guys, please try the new 1.4.0 version with all workarounds enabled and let me know how it works out for you
August 1st, 2010
If my phone is within a workaround zone Wi-Fi is on. Always ON. No way to switch it off. Just to go somewhere outside the workaround zone. Wi-Fi on doesn’t mean it is working. It is just on – so 3G is off and I have no Internet. I have to switch off Wi-Fi after sleep and it comes back by itself and works until next sleeping period. Un-installing and reinstalling the program doesn’t help. N1 Enomther v2.10.2
August 1st, 2010
@Igor: Are you using some other wi-fi related apps as well? Because wi-fi keep alive does not turn wi-fi on or off. It comes into effect only when some other app or user turns the wi-fi on.
August 1st, 2010
I used to use a widget to switch Wi-Fi on-off. Now it doesn’t work. I did a nandroid backup after wipe it didn’t solve the problem. I did a clean install and still not able to switch off Wi-Fi. Everything was working before I installed Wi-Fi keep alive
August 1st, 2010
Sorry, bro. My fault. I’ve found the problem. Not Wi-Fi Keep Alive.
August 1st, 2010
no problemo.. glad that you figured it out
August 1st, 2010
I was not able to maintain a Wifi connection when the screen sleeps with Wi-Fi Keep Alive and an HTC Aria with CM6 Froyo.
August 13th, 2010
I did not have success with any of the workarounds on the nexus one. When I enabled workaround 3 and then 4 the phone become sluggish. The keep alive application was no longer very responsive and often android asked if it should be forced closed, or wait which is what I did to turn it off each time. Not sure if this helps.
August 13th, 2010
Thanks for the feedback, Rob. This helps a lot. I got a report for the non-responsiveness in my developer dashboard but there was no information present about the situation/stack trace etc so I didn’t know when/what was causing this. I’ll try to fix this with the next release.
August 13th, 2010
No problems. If you would like me to run it up again later on to see if it is still affecting response time I can do that. I however did not have success in keeping the wifi connection from sleeping on the nexus one.
August 24th, 2010
I am trying the workarounds as I cannot keep wifi on on xperia 10 mini pro. I noticed that if u change the setting on the app it doesnt change the widget. So you could change the app to always on and the widget stays orange or white etc. Works ok the other way round though -If u change the widget it changes the app.
Trackbacks