Android Get contact group by ID

I have a contact ID, how do I get the group to which the contact is assigned? I'm sure this has something to do with the Contacts.Groups class, but I can't figure it out.

+6
android android-contentprovider contacts
source share
1 answer

In GroupMembership.PERSON_ID you have the Person identifier, and in the same GroupMembership.GROUP_ID table you have the group identifier. You can get groups using Contacts.Groups .

Remember that each β€œtable” also has a unique identifier to identify the row.

Hope this helps. (I also work on it)

+3
source share

All Articles