开发者

How to get the defined Contact Groups on an Android?

开发者 https://www.devze.com 2022-12-21 13:15 出处:网络
I would like to get a list of Contacts Groups already 开发者_开发技巧defined in the system, how can I do that?You can query the Contacts.Group table for the available groups.

I would like to get a list of Contacts Groups already 开发者_开发技巧defined in the system, how can I do that?


You can query the Contacts.Group table for the available groups.

You can use the Contacts.GroupMembership table to query what group a particular contact is a member of. PERSON_ID is the ID of the contact, GROUP_ID matches the ID of the group.

Note that both these APIs have been deprecated in favour of ContactsContract.Groups and ContactsContract.CommonDataKinds.GroupMembership from 2.0 onwards.

0

精彩评论

暂无评论...
验证码 换一张
取 消