title: Get details of contact in single query
body: <p>Hi all I am trying to get contact information from the contact database using ContentResolver with these field  want to get name, number, FORMATTED_ADDRESS, PHOTO
  details for a contact in one single query. </p>
  
  <p>So basically I need to make 3 queries per contact to obtain these 
  details. </p>
  
  <p>What I want to know is that, is there a simpler and more efficient way 
  to achieve what this. </p>
  
  <p>but using the below code i am getting exception.</p>
  
  <pre><code>java.lang.IllegalArgumentException: Invalid column data1
  </code></pre>
  
  <p>Can any body help me for finding the solution for the same.</p>
  
  <pre><code>Uri uri                = ContactsContract.Contacts.CONTENT_URI;
  String[] projection    = new String[] { ContactsContract.Contacts._ID,
                                          ContactsContract.Contacts.DISPLAY_NAME,
                                          ContactsContract.CommonDataKinds.Phone.NUMBER,
                                          ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS,
                                          ContactsContract.CommonDataKinds.Photo.PHOTO};
  String selection       = ContactsContract.Contacts.HAS_PHONE_NUMBER + " = '1'";
  String[] selectionArgs = null;
  String sortOrder       = ContactsContract.Contacts.DISPLAY_NAME + " COLLATE LOCALIZED ASC";
  
  Cursor contacts          = getContentResolver().query(uri, projection, selection, selectionArgs, sortOrder);
  </code></pre>