我正在尝试从电话中获取联系人号码,这是我的查询,但问题是我得到的联系人姓名很少,根本没有电话号码。谁能告诉我如何过滤掉没有联系电话的联系人?
Uri uri = ContactsContract.Contacts.CONTENT_URI;
String[] projection = new String[] {
ContactsContract.Contacts._ID,
ContactsContract.Contacts.DISPLAY_NAME,
ContactsContract.Contacts.PHOTO_ID
};
String selection =
ContactsContract.Contacts.IN_VISIBLE_GROUP + " = '" +1+"'";
String sortOrder = ContactsContract.Contacts.DISPLAY_NAME+ " COLLATE LOCALIZED ASC";