here is my code :
Cursor phones = cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,null,null, null);
while (phones.moveToNext()) {
String name=phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));
name1.add(name);
}
phones.close();
i want to do is to display only those contacts name with email address and if they dont have they shouldn't be displayed at all. im wondering how could i do that.