I have the same need. What you really want is the current bandwidth. You get this information from Wi-Fi, but not mobile. So, the next best thing I came up with was finding a 4G device or not. Unfortunately, this is not so simple.
In addition to WiMAX, you can check if the device has a mobile connection using the ConnectivityManager . If you find the type ConnectivityManager.TYPE_MOBILE , then you check the subtype. If the subtype is TelephonyManager.NETWORK_TYPE_LTE or TelephonyManager.NETWORK_TYPE_EHRPD , the device supports 4G.
If the active network is a subtype of TelephonyManager.NETWORK_TYPE_LTE , then you are on 4G (but I did not have the opportunity to verify this). If you find TelephonyManager.NETWORK_TYPE_EHRPD , you don’t know if you are in 3G or 4G ... at least I have not yet been able to detect the difference.
There may be other subtypes that point to a 4G device, but I have not tested them empirically.
This, of course, is not the final answer, but I hope this helps.
source share