【发布时间】:2014-06-18 13:55:04
【问题描述】:
目前在我的应用程序中,我使用以下光标查询获取所有联系人。
String[] columnsToReturn = new String[] {
ContactsContract.Contacts._ID,
ContactsContract.Contacts.DISPLAY_NAME_PRIMARY
};
Cursor contactsCursor = getActivity().getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, columnsToReturn, null, null, null);
这会返回所有联系人,包括 Skype、WhatsApp 等。我不想要这些。我只想要“正常”的。那些不适合任何应用程序的应用程序,只是存储在您的 Google 帐户中的应用程序。我该怎么做?
另外,我可以排除用户自己的条目吗?例如,我的名字多次出现在我所有不同的电子邮件地址的列表中。
【问题讨论】:
标签: android android-contacts android-cursor