Manifest.xml
<uses-permission
android:name=”android.permission.READ_CONTACTS”
/>
代码:
cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null,
null);
cursor.getColumnIndex(PhoneLookup.DISPLAY_NAME);
cursor.getString(nameFieldColumnIndex);
cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));
cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,
ContactsContract.CommonDataKinds.Phone.CONTACT_ID+”=”+ContactId,null,null);
手机、单位电话 ..
PhoneNumber =
phone.getString(phone.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
(contact + “:” + PhoneNumber +”\n”);