PHP
·
发表于 5年以前
·
阅读量:8303
public static void sendSms(Context context, String phoneNumber,String content) {
Uri uri = Uri.parse( "smsto:" + (TextUtils.isEmpty(phoneNumber) ? "" :phoneNumber));
Intent intent = new Intent(Intent.ACTION_SENDTO, uri);
intent.putExtra( "sms_body" , TextUtils.isEmpty(content) ? "" : content);
context.startActivity(intent);
}