Contacts api usage

There are lots of examples online that load or display contacts. If you want to find out if a given contact has a picture or not you want the methods in ContactsContract.Contacts.

You can see an example of some code that gets a user image here: http://groups.google.com/group/android-developers/browse_thread/thread/beb1f5bd10460cd8/67126ca9a06a89df?show_docid=67126ca9a06a89df&pli=1

Basically, if the user has no image then after this line...

InputStream is =
ContactsContract.Contacts.openContactPhotoInputStream(m_context.getContentResolver(), photoUri);

...is will be null.
 
Back
Top