Isaac Waller
Isaac Waller

Reputation: 32730

Android Get Group of Contact by ID

I have a contact ID, how do I get the group the contact is assigned to? I am sure it is something to do with the Contacts.Groups class but I cannot figure it out.

Upvotes: 6

Views: 3285

Answers (1)

Jbeer
Jbeer

Reputation:

In GroupMembership.PERSON_ID you have the ID of the Person, and in the same table GroupMembership.GROUP_ID you have the ID of the group. You can retrieve the groups with the Contacts.Groups.

Remember that in every "table" there is and unique ID to identify the row.

Hope this helps. (Im working on it too)

Upvotes: 5

Related Questions