I am trying to display a contact image in my listview and my code has worked until I discovered users on the nexus 5 couldn't see their contacts images. I did more testing and found that the issue persisted more and more in KitKat (4.4). I took the code for showing contacts from this link.Using code from Google developer website I cannot get the contact images to display.
The code is in the link. How I can get the contact image to display in KitKat and other versions?
Here is the links I have looked at in other questions.
How to query Android MediaStore Content Provider, avoiding orphaned images?
Get/pick an image from Android's built-in Gallery app programmatically
Get real path from URI, Android KitKat new storage access framework
Android Gallery on KitKat returns different Uri for Intent.ACTION_GET_CONTENT