Android Example SMS Incoming & Reply Separation

Good Day!

I've test this code to retrieve sms message, from my samsung, and it works.

' ------------------------------------------------------
Sub Process_Globals
Dim sms_idkey As Long
Dim threadid_dat As Long
Dim datelog_dat As String
Dim readsms_dat As Boolean
Dim bodysms_dat As String
Dim addresscp_dat As String
End Sub

Sub GetSMS_Click
Dim SmsMessages1 As SmsMessages
Dim List1 As List

List1 = SmsMessages1.GetAll()
For i = 0 To List1.Size - 1
Dim Sms As Sms

Sms = List1.Get(i)

Log(Sms.Id & " - " & Sms.Address & " - " & Sms.Body)

sms_idkey=Sms.Id
threadid_dat=Sms.ThreadId
datelog_dat=DateUtils.TicksToString(Sms.Date)
readsms_dat=Sms.Read
bodysms_dat=Sms.Body
addresscp_dat=Sms.Address

Next
End Sub

' -----------------------------------------------------------

I just want to ask if how to use the SMS features to separate the Incoming SMS and Reply SMS, upon retrieving messages in the phone, since the above code will retrieving all sms message mixed, whether reply or sent from the sender.


Jhoey
 
Top