Let go over your Android 2.x Visible Contact ID / Names garden pointer (via ContactsContract ):
Cursor c = getContentResolver().query(
Contacts.CONTENT_URI,
new String[] { Contacts._ID, Contacts.DISPLAY_NAME },
Contacts.IN_VISIBLE_GROUP + " = '1'",
null,
Contacts.DISPLAY_NAME + " COLLATE LOCALIZED ASC"
);
Is there any way to filter this to get contacts that have at least one email address and / or phone number?
I see that I can use Contacts.HAS_PHONE_NUMBER ... but I do not see HAS_EMAIL anywhere. (Say it won't look ugly.)
source
share