Android Question How to send multiple message in SMS?

Lyndon Bermoy

Active Member
Licensed User
Longtime User
I know already how to send an sms. But no matter how I tried to send it in multiple numbers, it can only send one phone number.

Here's my code:
B4X:
Sub Process_Globals
   'These global variables will be declared once when the application starts.
   'These variables can be accessed from all modules.

End Sub
Sub Globals
   Dim Sms As PhoneSms
   Dim PE As PhoneEvents
   Dim btnTest As Button
   Dim strPhoneNumber As String = "09123456789;"
End Sub

Sub Activity_Create(FirstTime As Boolean)
   PE.Initialize("PE")
   Sms.Send2(strPhoneNumber, "This sms was sent from Basic4Android",  True, True)
   
End Sub

Sub PE_SmsDelivered (PhoneNumber As String, Intent As Intent)
   Log ("SMS delivered to " & PhoneNumber)
End Sub

Sub PE_SmsSentStatus (Success As Boolean, ErrorMessage As String, PhoneNumber As String, Intent As Intent)
   If Success = True Then
     Log ("SMS Sent to " & PhoneNumber)
   Else
     Log ("Failed to send SMS to " & PhoneNumber & ". Error = " & ErrorMessage)
   End If
End Sub

Now guys please help me to send it to multiple phone numbers. Thanks :)
 
Top