How can I send an SMS greater than 160 characters using PhoneSms.Send2?
The code below does NOTHING. We don't get a crash, and the PE_SmsSentStatus is never called with success or error.
The code below does NOTHING. We don't get a crash, and the PE_SmsSentStatus is never called with success or error.
B4X:
Sub PE_SmsSentStatus(Success As Boolean, ErrorMessage As String, PhoneNumber As String, Intent As Intent) As Boolean
Log("MessageSentStatus: " & Success & " " & ErrorMessage & " " & PhoneNumber & " " & Intent.ExtrasToString)
End Sub
sub SendSMS
Dim p As PhoneSms
dim Mobile as string = "00000000000"
dim Message as string = "A MESSAGE LONGER THAN 160 CHARACTERS... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ... PADDING ..."
p.Send2(Mobile,Message,True,False)
End Sub