Question

I use TelephonyManager to get the network type as in getNetworkType(). Currently I see only CDMA and GSM networks only. How do I detect WiMAX as the networkType. Sprint's HTC EVO 4G phone supports WiMAX and when I use getNetworkType(), I get NETWORK_TYPE_EVDO_A even though the handset is on WiMAX network.

Was it helpful?

Solution

Check out this document here

Section 2.1 gives a sample and method calls to determine if the WiMax connection is enabled. This may only work for the Evo and Epic - it doesn't say if it works for the Evo Shift but my guess is that it will work fine for any Android Sprint 4G device.

Something like this:

ConnectivityManager cm = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);
int networkType = cm.getActiveNetworkInfo().getType();

Edit: I just noticed the document states

While 4G is the active data connection you can only detect this using the ConnectivityManager, under this condition the TelephonyManager will still reflect the status of the CDMA network which is providing voice services. You will not see any 4G/WiMax information show up in the TelephonyManager.

OTHER TIPS

Honeycomb API level has introduced updates to Telephony Manager including a number of new networks - be sure to filter by API 11:

int NETWORK_TYPE_LTE Current network is LTE int NETWORK_TYPE_UMTS Current network is UMTS

Note that it will probably take at least 6 months until we start seeing this in the "wild", as new devices (Such as HTC Thunderbolt) are still shipping with Froyo. It will be interesting to see what workaround Verizon implemented in Froyo for LTE.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top