title: Getting user information from Contact List Android
body: <p>I need to get the name, email and phone number from each contact of my contacts list.</p>
  
  <p>The problem is I can get name and phone number, but not the email. I'm getting the phone number instead of email.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Cursor phones = getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, null,null, null);
          while (phones.moveToNext()) {
  
              String name = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));
              String phoneNumber = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
              String email = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Email.ADDRESS));
  
              ContactItem objContact = new ContactItem();
              objContact.setName(name);
              objContact.setPhoneNo(phoneNumber);
              objContact.setEmail(email);
              list.add(objContact);
  
          }
          phones.close();
  </code></pre>