Android Question Contact database threadId

Lego Jérôme

Member
Licensed User
hi i'm developing a message app.
I would need to find the "threadId" of my contacts, using this method if it is possible.

B4X:
Sub GetAllContacts
    Dim phonesUri As Uri
    phonesUri.Parse("content://com.android.contacts/data/phones")

    Dim phones As Cursor = cr.Query(phonesUri, Array As String("data4", "display_name","contact_id"),"", Null, "display_name")
    For p = 0 To phones.RowCount - 1
        phones.Position = p
        Log(phones.GetString("display_name") & " " & phones.GetString("data4") & " " & phones.GetString("contact_id"))
    Next
    phones.Close
End Sub

Because when I do that it sends me the "contactId" and not the "threadId"
 
Top