I know how to retrieve contact data for specific contacts. However, i can\'t find a way to get all contacts plus some of their details in a single query. The following code
All contact information in Android 2.0 is stored in a single database table. So you can get all the information you need in a single query:
Cursor c = getContentResolver().query(ContactsContract.Data.CONTENT_URI,
null, null, null, sortOrder);
The just iterate through the data and check Data.MIMETYPE
column. For example, if this column has StructuredPostal.CONTENT_ITEM_TYPE
value, then you can get StructuredPostal
fields from this column.