Android Get Group of Contact by ID
-
19-08-2019 - |
Question
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.
Solution
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)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow