我正在编写一个应用程序,它将短信发送给多个联系人。联系人号码存储在ArrayList
(从其他活动收到)中。我无法使用此ArrayList
将多个联系人传递到内置的SMS android应用程序。这是代码:Android使用ArrayList将短信发送到多个联系人
ArrayList<String> numbersArrayList=getIntent().getExtras().getStringArrayList("phoneNumbers");
String message= "this is a custom message";
Intent smsIntent = new Intent(Intent.ACTION_VIEW);
smsIntent.putExtra("sms_body", message);
smsIntent.putExtra("address", ??????????);
smsIntent.setType("vnd.android-dir/mms-sms");
startActivity(smsIntent);
我可以遍历并打印这些接触到的logcat简单的“针对每个”循环和压倒一切的toString方法。
检查这个帖子 http://stackoverflow.com/questions/14065910/sending-sms-programmatically-to-multiple-people-getting-generic-error – dracula
请参阅此http://stackoverflow.com/questions/12276712/sending-sms-to-multiple-contacts-using-loop –