快速获取联系人数据

来源:互联网 发布:linux自启动脚本编写 编辑:程序博客网 时间:2024/09/21 08:57

没见过比这个更简单粗暴快速有效的了:

Cursor phones = getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,null,null, null); while (phones.moveToNext()) { String name=phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME)); String phoneNumber = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)); } phones.close();


0 0