Uri smsToUri = Uri.parse("smsto:" + mContact.getNumber());
Intent intent = new Intent(Intent.ACTION_SENDTO, smsToUri);
intent.putExtra("sms_body", "The SMS text");
Intent intent = new Intent(Intent.ACTION_SENDTO, smsToUri);
intent.putExtra("sms_body", "The SMS text");
mContext.startActivity(intent);
或者:
Uri smsToUri = Uri.fromParts("smsto", mContact.getNumber(), null);
Intent intent = new Intent(Intent.ACTION_SENDTO, smsToUri);
intent.putExtra("sms_body", "The SMS text");
startActivity(intent);