hi
I have galaxy duos with android ver 4.2.2
the above code runs as service
with the toastmessagesshow I can check that the proram pass from the code
When I place the sim card at position 2 it receive the sms and and recognize the word "position" and sent ? the message BUT the message never arrived to the other phone. (I have a device with one sim and this routine works ok)
also the return True it does not seems me to work because after a few second the message arrives to the sms folder
when I place the sim card at postion 1 the SI_MessageReceived never raised.
I use only 1 card
so what can I do with the senSms routine to sent the sms?
is there any code to choose between the sims cards (it does not matter which card I will use)
End Sub
B4X:
Sub SI_MessageReceived (From As String, Body As String) As Boolean
'ToastMessageShow(From, True)
' εδω ελέγχω αν με ανδιαφέρει το μηνυμα
myTXT= Body
myTXT=myTXT.ToLowerCase
ToastMessageShow("receive sms" ,False)
If myTXT.Contains("position")=True Then
'sent an sms to receipient
'myTXT="Lon="& Mhkos &" " & "Lat=" & Platos
myTXT="Τελευταία γνωστή θέση την " & Hmeromhnia & " ώρα " & Vra & CRLF
myTXT= myTXT & "https://maps.google.com/maps/place?q=" & Platos &"," & Mhkos
'SenSms.Send(Ar_kinhtoy,myTXT)
SenSms.Send("0030693665xxx",myTXT)
ToastMessageShow("Send position", True)
Return True ' if return true the message aborted I want to abord the message
End If
I have galaxy duos with android ver 4.2.2
the above code runs as service
with the toastmessagesshow I can check that the proram pass from the code
When I place the sim card at position 2 it receive the sms and and recognize the word "position" and sent ? the message BUT the message never arrived to the other phone. (I have a device with one sim and this routine works ok)
also the return True it does not seems me to work because after a few second the message arrives to the sms folder
when I place the sim card at postion 1 the SI_MessageReceived never raised.
I use only 1 card
so what can I do with the senSms routine to sent the sms?
is there any code to choose between the sims cards (it does not matter which card I will use)
End Sub