HI,
I am able to get the contact cursor using the following:
Cursor cursor = context.getContentResolver().query(People.CONTENT_URI,
new String[] {People._ID, People.PRIMARY_EMAIL_ID},
selection, null, null);
And then I try to get the actual email address using:
String emailID = cursor.getString(PEOPLE_PRIMARY_EMAIL_ID_INDEX);
if (Integer.parseInt(emailID) != -1) {
Cursor cursor2 = context.getContentResolver().query(Uri.withAppendedPath(ContactMethods.CONTENT_URI, emailID), new String[] {ContactMethods.DATA}, null, null, null);
// cursor2 count is always 0
}
}
Anyone has any idea?