You're close. The email address is contained in the DATA column. Using
CONTENT_EMAIL_URI automatically selects only emails (KIND=KIND_EMAIL),
and only returns the columns _ID, NAME, and DATA. (Internally, it does
a join of the "people" and "contact_methods" tables.) You might also
sort on ISPRIMARY, so that the person's primary email (if any) is
first. Something like:

    Cursor addr = activity.managedQuery(
        Contacts.ContactMethods.CONTENT_EMAIL_URI,
        new String[] {
            Contacts.ContactMethods.DATA,
        }, Contacts.ContactMethods.PERSON_ID + "=?",
        new String[] {IDPerson},
        Contacts.ContactMethods.ISPRIMARY + " DESC");

If the cursor is not empty, the first row should have the/a primary
email.

//Ken
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to