You may want to look at ContentProvider
s for the ContactsProvider.
The ContentProvider tutorial even uses Contacts as an example:
the URI for the table that matches phone numbers to people and the URI for the table that holds pictures of people (both controlled by the Contacts content provider) are:
android.provider.Contacts.Phones.CONTENT_URI
android.provider.Contacts.Photos.CONTENT_URI
Dmitri Plotnikov has some very useful things to say in this Google Group thread.