Check if the phone can send SMS messages

I already read some related questions, but most of them were for calls, not SMS. What I have found so far:

TelephonyManager manager = (TelephonyManager) context
        .getSystemService(Context.TELEPHONY_SERVICE);
if (manager.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE) {
    // I guess here are devices that are unable to send SMS
} else {
    // can send SMS
}

Is it true that devices with TelephonyManager.PHONE_TYPE_NONE cannot send SMS? I really do not understand the description of TelephonyManager.PHONE_TYPE_NONE, which is "No radiotelephone."

Thank!

+5
source share
2 answers

Yes, with TelephonyManager.PHONE_TYPE_NONE you cannot send SMS. How a radio network is required to send SMS. However, you can use some IP-based messengers, such as an application, ebuddy on

android.hardware.telephony ( uses-feature Android), , // SMS.

Galaxy TAB. -, PHONE_TYPE_CDMA, ,

+2

:

Boolean canSendSMS (Context context)
{
PackageManager pm = context.getPackageManager();
return (pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) || pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_CDMA))
}
+2

All Articles