Android Get Group of Contact by ID

狂风中的少年 提交于 2019-12-21 12:55:48

问题


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.


回答1:


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)



来源:https://stackoverflow.com/questions/657154/android-get-group-of-contact-by-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!