Pick contact from Contacts list and select a specific email for that contact

Viewed 109

I know that if I create an Intent like this:

val contactPickerIntent = Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI)
        startActivityForResult(contactPickerIntent, request_code)

I will be able to pick a contact from my Contacts list.

And if i set the intent like this:

val contactPickerIntent = Intent(Intent.ACTION_VIEW, ContactsContract.Contacts.CONTENT_URI)

I will be able to go into the selected contact details (from within the contacts app) but i won't be able to pick anything from it.

The thing is I need to open the contact's details and select one of it's email addresses, in case he has more than one, and pick it.

Is there a way to do that?

1 Answers
Related