本文介绍了ContactsContract.CommonDataKinds.Phone.CONTENT_URI和ContactsContract.Contacts.CONTENT_URI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在android中检索联系人列表我看到了允许您使用ContactsContract.CommonDataKinds.Phone.CONTENT_URIContactsContract.Contacts.CONTENT_URI读取联系人的代码.

In how to retrieve the list of contacts in android I see code that allows you to read contacts using either ContactsContract.CommonDataKinds.Phone.CONTENT_URI or ContactsContract.Contacts.CONTENT_URI.

它们之间有什么区别?

What is the difference between them?

什么时候可以不同?

推荐答案

使用 ContactsContract.Contacts 来查询 just Contacts ContactsContract.CommonDataKinds.Phone 查询诸如电话号码之类的详细信息.

Use ContactsContract.Contacts to query just Contacts and ContactsContract.CommonDataKinds.Phone can be used to query for details like Phone Numbers if you have the ID of a contact.

请确保在常量的末尾添加.CONTENT_URI,并查看文档以获取更多信息.

Be sure to add .CONTENT_URI at the end of the Constant and check the documentation for more information.

这篇关于ContactsContract.CommonDataKinds.Phone.CONTENT_URI和ContactsContract.Contacts.CONTENT_URI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 04:47