我想检索所有联系人(任何类型,例如Google同步,手机内存,SIM卡等),并从A-Z出现到按联系人姓名的第一个字符过滤的很多部分中
String[] projection = new String[]{
ContactsContract.Data.CONTACT_ID,
ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME_PRIMARY,
ContactsContract.CommonDataKinds.Phone.NUMBER,
ContactsContract.CommonDataKinds.Phone.NORMALIZED_NUMBER,
ContactsContract.CommonDataKinds.Phone.STARRED};
String orderBy = ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME_PRIMARY;
Uri uri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;
String selection = null;
Cursor cur = null;
if (mSearchString != null) {
selection = ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME_PRIMARY + " LIKE '"+ mSearchString +"%'";
cur = context.getContentResolver().query(uri, projection, selection, null, orderBy);
}
以某种方式无法正常进行选择,某些Alphabet不显示我的联系人。有人可以帮助我吗?