question: public static void launchSmsIntent ( final Activity activity , String number , String text ) { Log . i ( LOG_TAG , "Launch SMS intent to " + number ) ; Uri smsUri = Uri . parse ( "smsto:" + number ) ; Intent smsIntent = new Intent ( Intent . ACTION_SENDTO , smsUri ) ; smsIntent . putExtra ( "sms_body" , text ) ; PackageManager smspackageManager = activity . getPackageManager ( ) ; List < ResolveInfo > smsresolveInfos = smspackageManager . queryIntentActivities ( smsIntent , 0 ) ; if ( smsresolveInfos . size ( ) > 0 ) { activity . startActivity ( smsIntent ) ; } }
target:  Launch a SMS intent if the device is capable.