Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intent to send an SMS to multiple contactcs

Trying to initiate an intent to send an SMS to multiple recipients with the following code:

Intent smsIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
"sms", destination, null));

However in the destination string say I have "555-555-5555,555-555-5556". The comma delimiter is working fine on a Samsung vibrant. However, this will not work on a nexus 1. On the nexus one i need to use a semicolon as the delimiter and then it works. On the nexus one, if I use commas as the delimiter, it only picks up the last phone number. If I use the semicolon, the nexus one picks up all the phone numbers however, it then breaks the vibrant. With the semicolon, the vibrant does not pick up any of the phone numbers. Any insights?

like image 653
Hernan Santiesteban Avatar asked Dec 04 '25 00:12

Hernan Santiesteban


1 Answers

You should file feature request in android for the public telephony api to standardize this kind of stuff.

Until now (Gingerbread 2.3.3) there is no "default character" or api do discover what is the correct for each rom.

Anyway, I suggest that you ask people do test in different roms and create switch cases in your app. It will not work in all of them, but could work in most of.

like image 124
Claudio Bastos Avatar answered Dec 06 '25 13:12

Claudio Bastos