To load the photo, I use:
- Code: Select all
Uri contactsURI = ContentUris.withAppendedId(Contacts.CONTENT_URI, id);
InputStream is = Contacts.openContactPhotoInputStream(getContentResolver(), contactsURI);
The id comes from an onItemClick - event in a ListView that displays all contacts (Contacts.CONTENT_URI, without any filter).
When the photo was defined "by hand" (eg a picture made by the camera) everything works fine. But if the user synced the contacts with Facebook using the Facebook application on the Droid, the method openContactPhotoInputStream always returns null, as if there was no photo defined.
Any idea what I am doing wrong?