Question

I'm using the TelephonyManager on API level 8 to determine the network type and subtype. Though it does not give me an option for LTE, HSPAP, EVDO_8 and EHRPD. They're all available on API level 9+. I want my app to be usable on API level 8+. Can I and if: how can I check for those subtypes on API level 8+?

Or is it possible to only check for those subtypes if the using phone is running on that specific API level?

Thanks.

Was it helpful?

Solution

There are several LTE devices that shipped with API <9 that you might want to support. You can still access any of the new values with earlier APIs; just use the constant values instead of the variable name. You could refer to all network types with their values if you wished.

For example, if you are looking to use NETWORK_TYPE_LTE, use the value 13 instead. Here are the values implemented after API 8:

  • NETWORK_TYPE_EVDO_B: 12
  • NETWORK_TYPE_LTE: 13
  • NETWORK_TYPE_EHRPD: 14
  • NETWORK_TYPE_HSPAP: 15

This link has the full list.

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