How can I identify programmatically whether the data connection used by the android phone is 2.75G, 3G or 4G?
I am requiring this, for gathering data from multiple users using different data connections for data services.
How can I identify programmatically whether the data connection used by the android phone is 2.75G, 3G or 4G?
I am requiring this, for gathering data from multiple users using different data connections for data services.
Use TelephonyManager.GetNetworkType(). The network types correspond to your requirements as follows:
GSM-based systems:
NETWORK_TYPE_GPRS Current network is GPRS - 2G
NETWORK_TYPE_EDGE Current network is EDGE - sometimes called 2.75G
NETWORK_TYPE_UMTS Current network is UMTS - 3G
NETWORK_TYPE_HSDPA Current network is HSDPA - 3G
NETWORK_TYPE_HSUPA Current network is HSUPA - 3G
NETWORK_TYPE_HSPA Current network is HSPA - 3G
NETWORK_TYPE_HSPAP Current network is HSPA+ - 3G, but sometimes called 3.5G
NETWORK_TYPE_LTE Current network is LTE - 4G
NETWORK_TYPE_IDEN Current network is iDen - a Motorola system built on GSM - corresponds to 2G
CDMA-based systems:
NETWORK_TYPE_CDMA Current network is CDMA: Either IS95A or IS95B - 2G
NETWORK_TYPE_1xRTT Current network is 1xRTT - Sometimes called 2.5G.
NETWORK_TYPE_EHRPD Current network is eHRPD - the best explanation I found for eHRPD is here. Basically, it's an evolution of EVDO, that is routed through the LTE core, so that EVDO can hand over seamlessly to LTE. LTE is Qualcomm's 4G system of choice for CDMA handsets (see here, under "UMB"). eHRPD is 3G.
NETWORK_TYPE_EVDO_0 Current network is EVDO revision 0 - 3G
NETWORK_TYPE_EVDO_A Current network is EVDO revision A - 3G
NETWORK_TYPE_EVDO_B Current network is EVDO revision B - 3G
There is a comparison of mobile network standards, including some figures about maximum speeds, that put the 2G/3G/4G estimates into context, on Wikipedia. Check out the speeds of HSPA+ and LTE.
You can do this with the help of TelephonyManager sample code.
Check out this answer How to determine if network type is 2G, 3G or 4G