I am programming a Nexus 7 and need to determine whether the system has a 3G/4G radio or not. How do I do that?
Asked
Active
Viewed 861 times
0
-
5A modem? Why would it have a modem? Do you mean a wifi radio, or a 3G/4G radio? – Gabe Sechan Jun 21 '14 at 17:11
-
Yes I do mean 3G/4G radios. Such radios are also called radio modems where I work. – user43995 Jun 21 '14 at 18:30
2 Answers
2
Use TelephonyManager.getPhoneType ()
. Returned values are
PHONE_TYPE_NONE
PHONE_TYPE_GSM
PHONE_TYPE_CDMA
PHONE_TYPE_SIP
Checking if CDMA or GSM should work

Gabe Sechan
- 90,003
- 9
- 87
- 127
0
You can probably just check for the presence of a mobile network type.
boolean hasRadio()
{
ConnectivityManager connManager = (ConnectivityManager) getActivity().getSystemService(Activity.CONNECTIVITY_SERVICE);
return (connManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) != null);
}

selbie
- 100,020
- 15
- 103
- 173