I am trying to have a list of contact numbers.
I want to know is there a way to send a text message to more than 1 number iprogrammatically in Android?
If so how?
It’s incredibly easy to send an SMS to many numbers at a time with SimpleTexting. In just a few minutes you can conveniently and effectively communicate with all of your contacts. All you need to do is… 1. Sign up for an account Try our SMS broadcast service for free for 2 weeks. You can test us out by sending a free text message campaign.
You can also send text messages to multiple recipients from your Android forum. This requires wireless supported phones. Click on ‘Send an SMS reply to all the recipients and get personal replies. With the advancement in technology, it is now possible to send text messages to multiple recipients at once.
Most default messaging apps only let you text around 10 people This isn’t a major problem if it’s a group of friends coordinating dinner plans but it quickly becomes one if you want to send one SMS to multiple numbers as a business. There are other benefits of using a paid SMS service to send messages. You can also:
Write the numbers in the county’s or city’s local format. For example – 07520633003 Next, add from your contacts and then add from all your lists. Then you need to also add your frequently used numbers. Next, choose the number you want your text to be sent from. Next, type your message in the message box.
You can't do this via Intent, as the android SMS app doesn't allow multiple recipients.
You can try using the SmsManager
class.
First of all you need to request the permission android.permission.SEND_SMS
in your AndroidManifest.
Then you can do something along these lines.
// you need to import the Sms Manager
import android.telephony.SmsManager;
// fetch the Sms Manager
SmsManager sms = SmsManager.getDefault();
// the message
String message = "Hello";
// the phone numbers we want to send to
String numbers[] = {"555123456789", "555987654321"};
for(String number : numbers) {
sms.sendTextMessage(number, null, message, null, null);
}
// string input by a user
String userInput = "122323,12344221,1323442";
// split it between any commas, stripping whitespace afterwards
String numbers[] = userInput.split(", *");
for group sms or multiple sms use this
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
i.putExtra("address", "987385438; 750313; 971855;84393");
i.putExtra("sms_body", "Testing you!");
i.setType("vnd.android-dir/mms-sms");
startActivity(i);
//use permission: <uses-permission android:name="android.permission.SEND_SMS"/>
you can modify this "9873854; 750313; 971855; 84393" with your contact number
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With