The device has a CDMA telephony stack.
Constant Value: "android.hardware.telephony.cdma"
CDMA stands for Code Division Multiple Access.
In the U.S., Sprint, Verizon and U.S. Cellular use CDMA. Most of the U.S. uses CDMA. Most of the world uses GSM. CDMA Phones do NOT use a SIM card.
There is no such thing as an unlocked phone on a CDMA phone.
If the phone used 4G LTE, it may have a SIM card, as it is required for 4G LTE.
1. Get a PackageManager Instance named myPackageManager.
2. Create a Boolean Variable named bolCDMASupported.
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 bolCDMASupported. It will then display a toast displaying the CDMA telephony ability of the device to the user.
bolCDMASupported = myPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_CDMA);
if (bolCDMASupported) {
Toast.makeText(this, "Device has CDMA Telephony capability", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(this, "No CDMA Telephony capability!", Toast.LENGTH_LONG).show();
}
5. Compile and run!
Resources:
- Professional Android 4 Application Development by Reto Meier, pg 702
- Professional Android 4 Application Development by Reto Meier, pg 702