Reputation: 597
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?
Upvotes: 0
Views: 881
Reputation: 93728
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
Upvotes: 2
Reputation: 104589
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);
}
Upvotes: 0