Judy
Judy

Reputation: 1776

How to send a SMS to many recipients?

How to send a SMS to many recipients in android? I want to send a SMS to many receivers in my application. I know this code:

Uri smsToUri = Uri.parse("smsto:" + 10086);
                Intent intent = new Intent(
                        android.content.Intent.ACTION_SENDTO, smsToUri);
                String message = "hello";
                // message = message.replace("%s", StoresMessage.m_storeName);
                intent.putExtra("sms_body", message);
                startActivity(intent); 

This work for single recipient. But How to send the message to many recipients by using "ACTION_SENDTO" intent? That is too say, how to call the third-party application to send a SMS to many recipients in phone?

Upvotes: 4

Views: 15416

Answers (1)

ρяσѕρєя K
ρяσѕρєя K

Reputation: 132992

send sms to multiple numbers:

String strnum="10086;10086;10087;10089";
Uri smsToUri = Uri.parse("smsto:" + strnum);

or for Sending SMS to Multiple numbers using SmsManager see this post

Unable to send sms using SmsManager in Android

Upvotes: 9

Related Questions