Though WiFi consumes less battery power than 3G and 4G networks, some apps on Android phone behaves differently when WiFi is on. For example, Google Maps location caching, Dropbox or Google+ uploads, etc works on WiFi (by default) and eats up the battery power. By controlling WiFi on/off state wisely, users can longer their phone’s battery life without losing functionality as well as user experience. Here is how it can do automatically with a free tool Better WiFi on/off.
WiFi on/off is a simple Android app that allows you to control your phone’s WiFi connection based on various rules that you define. After installing the app, you can define your own rules by going to settings menu. Run WiFi on/off and select Preferences.
Currently, the app is in beta stage and offers following rules to control WiFi.
Wifi on when Screen on and screen is unlocked – These two options turns WiFi on either when screen on or screen unlocked.
WiFi on when plugged in – enabling this option turns your phone’s WiFi on when power is plugged in to AC.
Wifi stays on when – A connection could be established within a given time span (if not it is turned off again)
Wifi goes off when – Screen goes off (with a delay), Phone is unplugged from A/C.
The developer will add more advanced features like location based rules (based on cell localization), time based rules, whitelisted access point to stay connected on, etc in the upcoming release.
As it is in beta, currently the Better WiFi on/off app is not available through Google Play Store. Interested users can download the app from this XDA developer page.