How to check whether a particular device supports 4G networks in Android?
This might work. It should check for WiMax 4g:
private boolean is4gavailable() {
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();
}
}
Try looking at this for a little more clarification.
ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo[] info = cm.getAllNetworkInfo();
for(int i=0; i <info.length; i++){
Log.i("netinfo"+i, info[i].getType()+"");
Log.i("netinfo"+i, info[i].getTypeName());
Log.i("netinfo"+i, info[i].getSubtype()+"");
Log.i("netinfo"+i, info[i].getSubtypeName());
}
Use this piece of code and get all available options on the device. I think you should be able to get all capabilities of the device.
and network type info is present in http://developer.android.com/reference/android/telephony/TelephonyManager.html.
I think network types added from API level 11 are for 4g. Check it yourself.