是否可以获得在官方联系人申请中显示的联系人?
我试图以这种方式检索联系人:
contentResolver = ApplicationSingleton.getInstance().getContentResolver();
String[] projection = new String[]{ContactsContract.Contacts._ID, ContactsContract.Contacts.DISPLAY_NAME, ContactsContract.Contacts.HAS_PHONE_NUMBER, ContactsContract.Contacts.STARRED};
String selection = null;
Cursor cursor = contentResolver.query(ContactsContract.Contacts.CONTENT_URI, projection, selection, null, null);
while (cursor.moveToNext()) {
String name = (cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME)));
Log.d("CONTACT: ", name);
}
cursor.close();
然后我收到所有与我的电子邮件相关联的联系人。
感谢。
答案 0 :(得分:0)
使用此,
<?= $variable ?>