Android examples for Phone:SMS
Determines if user device has capability of SMS.
import android.content.Context; public class Main{ private static PhoneNumberUtils phoneNumberUtils; /**/*from w ww . j a v a2 s . com*/ * Determines if user device has capability of SMS.<p> * * Requires READ_PHONE_STATE Permission must be set to use this function * @param context * Context to derive device information * @return true if user device has SMS capability; false otherwise */ public static boolean hasSmsCapability(Context context) { return phoneNumberUtils.isAbleToReceiveSms(context); } }