title: How to resolve mobile data connection(2G/3G/EDGE/GPRS) lost in android after coming out from wifi programatically?
body: <p>I need a fix for this strange problem appearing in android. Sometimes I notice that even I have full cellular network, data network is lost.(Not able to connect to internet although have all set properly). This possibly occurs after I leave wifi. A quick fix to make it working is toggle 2G/3G option in settings --> Mobile Networks, which probably clears the network stack and makes it all working.
  But for my application, which requires always to be connected to internet, I need a fix programatically. I cannot toggle that from code ? Or can I ?</p>
  
  <p>I read and tried a fix by rewriting APN settings, but that do not solve the issue entirely, as we move out from wifi connectivity. 
  Do anyone have any fix for this from code ?</p>