I'm trying to get a contact's full-size image given a contact id, I came up with this :
private Bitmap getUserPhoto(long contactId) {
Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI,
contactId);
Uri displayPhotoUri = Uri.withAppendedPath(contactUri,
Contacts.Photo.DISPLAY_PHOTO);
try {
AssetFileDescriptor fd = getContentResolver()
.openAssetFileDescriptor(displayPhotoUri, "r");
return BitmapFactory.decodeStream(fd.createInputStream());
} catch (IOException e) {
return null;
}
}
but the image size is too small (Thumbnail)
how can I get the full-size photo of a contact?
Thanks