how to get contact photo URI
I am working with Android Contact ContentProvider. I have a Phone Number and I need to get the URI of the Photo of the contact associated with this phone number. How can I do it??? I know I can get the raw data of the photo and build an InputStream , but I dont want the input stream, I need the URI . EDIT: Originally I'm using following code to fetch contact info Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNo)); Cursor cursor = context.getContentResolver().query(uri, details, null, null, null); To get the conatct id using the phone number use the following