当我通过 Intent 发送短信时,出现异常android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SENDTO typ=vnd.android-dir/mms-sms (has extras) }
请参阅下面的代码:-
try {
Intent sendIntent = new Intent(Intent.ACTION_SENDTO,Uri.parse("smsto:5551212;5551212"));
sendIntent.putExtra("sms_body", sendSMSStringOnCustomCheckIn());
sendIntent.setType("vnd.android-dir/mms-sms");
startActivity(sendIntent);
} catch (Exception e) {
Toast.makeText(getApplicationContext(),
"SMS faild, please try again later!",
Toast.LENGTH_LONG).show();
e.printStackTrace();
}
我想将短信发送到 2 个电话号码,两个电话号码都应显示在默认短信框的收件人框中。我该怎么做?