Here useful information is How to Display your contacts in List View
we want get contacts from ContactsContract means (The contract between the contacts provider and applications), your Contacts geting from Cursor
This Is Code for Getting All contacts from Cursor
we want get contacts from ContactsContract means (The contract between the contacts provider and applications), your Contacts geting from Cursor
This Is Code for Getting All contacts from Cursor
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));
ContactBean objContact = new ContactBean();
objContact.setName(name);
objContact.setPhoneNo(phoneNumber);
list.add(objContact);