Android-Universal-Image-Loader
Android-Universal-Image-Loader copied to clipboard
Can't display PHOTO_THUMBNAIL_URI
I get PHOTO_THUMBNAIL_URI from contacts content provider. But image is not displayed by UIL. Here's uri example: content://com.android.contacts/contacts/67/photo Main page says that "content" uri is supported.
Important information: the same thumbnail displayed correctly if I pass it to ImageView.setImageUri.
Also looked at the code and found these strings:
else if (imageUri.startsWith(CONTENT_CONTACTS_URI_PREFIX)) { // contacts photo
return getContactPhotoStream(uri);
}
Looks like it expects contact uri only but not contact photo. Ok, I got the ContactsContract.Contacts._ID and constructed the Uri like this:
Uri uri = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_URI, id);
But passing this Uri to ImageLoader doesn't work either. So how can I display contact photo via UIL?
I also met this bug. The ImageLoader dose not work only if the URI is "content://com.android.contacts/contacts/{CONTACT_ID}". Try this.
@Lingviston @zeatual +1, if I use ContactsContract.CommonDataKinds.Photo.CONTACT_ID everything works fine. I have read on stackoverflow, that it is common mistake to use ContactsContract.Contacts._ID.
http://stackoverflow.com/questions/5332333/android-getting-contacts-photo-from-data-email-query
so if your problem is solved, issue should be closed.
@zeatual tried that, didn't work. @Truerall perhaps your're right. I'm not able to test it right now and actually made a workouround extending BaseImageDownloader as far as I remember. However I think this have to be added to documentation.
Is there a workaround for this?