Can i get internet if i'm using Access Point for WiFi, i'm using the code
ConnectivityManager mConnectivity =(ConnectivityManager) getSystemSer开发者_JAVA技巧vice(Context.CONNECTIVITY_SERVICE);
mConnectivity.startUsingNetworkFeature(0, "TYPE_MOBILE");
Thanks
I think this SO post answers that question in general you can programmatically turn wifi off, which will force the connection to go 3G if available, or you set the network preference from the connectivity manager.
You should be really careful if you are developing a user application, they are not going to appreciate you forcing them to potentially incur 3G charges without notice.
精彩评论