The device has a GSM telephony stack.
Constant Value: "android.hardware.telephony.gsm"
GSM (Global System for Mobiles)
AT&T and T-Mobile use GSM. Most of the U.S. uses CDMA. Most of the world uses GSM. GSM Phones
1. Get a PackageManager Instance named myPackageManager.
2. Create a Boolean Variable named bolGSMSupported.
3. Set the Minimum and Target SDK version to 7 or greater.
4. In the onCreate method, add the below code. This will return the telephony ability to a boolean named bolGSMSupported. It will then display a toast displaying the GSM telephony ability of the device to the user.
bolGSMSupported = myPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_GSM);
if (bolGSMSupported) {
Toast.makeText(this, "Device has GSM Telephony capability", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(this, "No GSM Telephony capability!", Toast.LENGTH_LONG).show();
}
5. Compile and run!