Hi,
as one of my users reported that he's been charged for delivery reports by his provider for every single SMS he sent through my app, I changed my code to this one as recommended in an older thread here:
It seems to work fine.
But as my app needs to know if one SMS has been sent before it sends the next SMS I am using the PhoneState from PhoneEvents to get the SMS Sent status. But this seems to work any longer when sending through the new code above.
Am I right and is there a way to get the SMS Sent status?
Thanks,
Carsten
as one of my users reported that he's been charged for delivery reports by his provider for every single SMS he sent through my app, I changed my code to this one as recommended in an older thread here:
B4X:
Sub SendSms(PhoneNumber As String, Text As String)
Dim ps As PhoneSms
Dim r As Reflector
r.Target = r.RunStaticMethod("android.telephony.SmsManager", "getDefault", Null, Null)
r.RunMethod4("sendTextMessage", Array As Object(PhoneNumber, Null, Text, Null, Null), _
Array As String("java.lang.String", "java.lang.String", "java.lang.String", _
"android.app.PendingIntent", "android.app.PendingIntent"))
End Sub
It seems to work fine.
But as my app needs to know if one SMS has been sent before it sends the next SMS I am using the PhoneState from PhoneEvents to get the SMS Sent status. But this seems to work any longer when sending through the new code above.
Am I right and is there a way to get the SMS Sent status?
Thanks,
Carsten