It was pretty easy to get the Contact picture when querying the People.CONTENT_URI
, with a simple
People.loadContactPhoto(activity, ContentUr
I'm doing it in this way:
ContentResolver cr=this.getContentResolver();
Cursor cc = cr.query(ContactsContract.Contacts.CONTENT_URI,null, null, null, null);
while (cc.moveToNext())
{
contactId = cc.getString(cc.getColumnIndex(ContactsContract.Contacts._ID));
Uri contactPhotoUri = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, Long.parseLong(contactId));
InputStream is=ContactsContract.Contacts.openContactPhotoInputStream(cr, contactPhotoUri);
//blah-blah
}