I would like to know how to lookup contact photo URI using the lookup key of the contact. i have already implemented it using the contact id. but now i want it to be implemented using lookup key because of android contact aggregation feature.
my current implementation
public Uri getPhotoUri(String lookup)
{
Uri person = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, Long
.parseLong(lookup));
return Uri.withAppendedPath(person, ContactsContract.Contacts.Photo.CONTENT_DIRECTORY);
}
Thanks in advance