Thanks to some indie devs, this situation can now be avoided. You now have a host of apps at your disposal that will allow you to lock your phone to a specific data stream (WiFi or 3G), consequently saving the very crucial battery life and the pain than comes along with it. There are various methods using which you can restrict your phone to one type of network, and let us explore these.
3G WiFi Connection Mode
This is an app by developer Ivano Tomainu, which lets toggle between 4 types of connection settings, namely:
3G onlyWiFi only3G and WiFi off3G and WiFi on
Please note, that this is a widget and not a standalone app, so do not expect to see an icon in the app drawer upon installation.
From settings page is possible to disable statuses that are not useful. What the app does is simple: You can check/uncheck the modes you want to toggle to between the 4 provided options, and each tap on the widget will simply move you from one mode to the other. The developer maintains a discussion thread on XDA forums, which can be accessed here. You can install the app via the Play Store.
Auto WiFi / 3G Switch
Another straightforward application that provides similar functionality is Auto WiFi / 3G switch, developed by Notus.com.tr. Auto Wifi / 3G Switch is simple, lightweight application that allows you to extend battery life and reduce mobile data usage. This application disable Mobile Data / 3G connection automatically when your device is connected to a WiFi network and re-enable Mobile Data when your device is disconnected from WiFi network.
As stated in the app description, it simply disables your phones mobile data connection, i.e., 3G or 2G, when the device is connected to a WiFi network. Since there’s no other functionality the app provides, it comes with only one button using which you can enable or disable the feature.You can install the app via Play Store.
Other Methods
What happens when you have both, WiFi connected, and 3G turned on and your phone goes to sleep? Well, if you have WiFi auto sleep enabled (if you don’t know what this means, you probably have it enabled because that is how it comes from the factory), your phone turns WiFi off, and the 3G connection is used to establish a connection from your push notification enabled apps (Gmail, WhatApp, etc) to their respective servers. In order to avoid this, you can head over to your phone’s WiFi settings and turn off ‘power save during sleep’ or something like that. Lastly, you can use phone automation apps such as Tasker and define rules as to when and how your phone should behave. It is fairly simple to use once you get a hang of it, so go ahead, and give it a go!