Multi SMS recipients on the same message.

markbarrett_1

Member
Licensed User
Longtime User
Hi,

Is it possible to specify multiple phone numbers on a sms message?

Sms.New1("987-654321,123-456789","This is the message body.")

I've tried all sorts of combinations for the phone number from ; seperated, in <> etc. So I'm wondering if its

a) possible
b) what the syntax is.

I currently have my sms in a while loop with a single phone number per loop, but I'm looking at trying to speed it up by having multiple recipients on the one SMS message.

Thanks in Advance.

Cheers.

M
 

Cableguy

Expert
Licensed User
Longtime User
a: YES
b:

B4X:
Sub Globals
DIM number(3) '-3 is the total amount of numbers to store... if this is not a fixed value, use an arraylist control
End Sub

Sub App_Start
For x=0 to arraylen(numbers())-1
Sms.New1(Number(x),"This is the message body.") 
Next
End Sub

I currently have my sms in a while loop with a single phone number per loop, but I'm looking at trying to speed it up by having multiple recipients on the one SMS message.
SMS have always been targeted to one single recepient....
What the API does when sending multiple recipients is exactly what we do...cicle trought a series of numbers...
The speed will depend exclusevly of your device speed...
 
Last edited:

markbarrett_1

Member
Licensed User
Longtime User
Hi Cableguy,

Thanks for the response. My code is already very similar to the sample you provided.

The time I'm wanting to cut out is the time the phone has to do the protocol negotation with the mobile phone carrier. If you send an SMS via the phone (out of the box wm5/6 function) with 10 recipients, it takes almost no additional time than sending to one. I can only imagine underneath the covers the SMS protocol is negotiated, then all the numbers are sent and then the message that is going to go with those numbers. That cuts down on mobile phone latency as every time you start and stop a session, you burn tons of time.

Now in the basic4ppc case, I would imagine that everytime you do a sms1.new() you are building a new session to your mobile phone carrier and that is what is taking the time (sms1.new appears to be a syncronous call).

If the above is true a feature request maybe to have multiple phone numbers in a single message.

Cheers.

M
 
Top