I've got an ImageView which I'm displaying a contacts picture using a Uri which always looks similar to this:
content://com.android.contacts/contacts/34/photo
How would I be able to detect whether this photo exists, as if it doesn't then I want to use a placeholder instead (stored in my drawable folder). At the moment it just shows a blank image.
a function to get a contacts photo uri:
and calling that function (contactimage is an ImageView):
Possibly by using
ContactsContract.Data.PHOTO_ID
. If it doesn't have a value, then there is no photo.