Sub Process_Globals
Private cr As ContentResolver
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
cr.Initialize("cr")
End If
Dim smsUri As Uri
smsUri.Parse("content://sms")
Dim address As String = "999999"
Dim crsr As Cursor = cr.Query(smsUri, Array As String("thread_id", "body"), "address LIKE ?", _
Array As String("%" & address & "%"), "")
For i = 0 To crsr.RowCount - 1
crsr.Position = i
Dim tid As Int = crsr.GetInt("thread_id")
Log(tid)
Log(crsr.GetString("body"))
Next
crsr.Close
End Sub