下面代码就是获取到用户通讯录头像的代码:
ContentResolver cr = view.getContext().getContentResolver(); Uri uri = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, Long.parseLong(contact.contact_id)); InputStream input = ContactsContract.Contacts.openContactPhotoInputStream(cr, uri); Bitmap photo = BitmapFactory.decodeStream(input);
原文地址:http://my.oschina.net/Android1989/blog/292551