In order to test for the presence / absence of WiMax (4G) you need to do something like the following:
private boolean isNetworkAvailable() {
ConnectivityManager connec = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo mobileInfo = connec.getNetworkInfo(0);
NetworkInfo wifiInfo = connec.getNetworkInfo(1);
NetworkInfo wimaxInfo = connec.getNetworkInfo(6);
if (wimaxInfo!=null) {
return mobileInfo.isConnectedOrConnecting() || wifiInfo.isConnectedOrConnecting() || wimaxInfo.isConnectedOrConnecting();
}
else {
return mobileInfo.isConnectedOrConnecting() || wifiInfo.isConnectedOrConnecting();
}
}
A little hard won knowledge from the trenches.
hey man.. I have it implemented the same as you, BUT late this week people started complaining that my app was working correctly on one of their TMOBILE sim and not working on another TMOBILE sim. IN THE SAME PHONE!!
I am wondering if the new tmobile 4g has something with do with that!
Thanks
Rafa
LikeLike
Thanks for the heads up. Not at all surprising.
For all the love it seems to get, Android is one huge pain in the neck, support wise. Don’t even get me started on working with the Camera from phone to phone, even by the same manufacturer. I’m looking at you, Motorola Droid X and R2D2.
The fact that there are issues with 4G implementation is par for the course, given my experience.
LikeLike