1
void button_Click(object sender, EventArgs e)
{
//Create a new intent for choosing a contact
var contactPickerIntent = new Intent(Intent.ActionPick,
Android.Provider.ContactsContract.CommonDataKinds.Email.ContentUri);
//Start the contact picker expecting a result
// with the resultCode '101'
StartActivityForResult(contactPickerIntent,101); // mostra a lista dos contactos do telefone, so com as pessoas com email.
}
my code is this, when I click the button appear in all contacts of the user with email. And what I wanted was to know how I keep this information, for example the user selects a person from his contacts and I want to email that person, but for that I need to keep the contact information and that’s what I don’t know how to do.
Thanks to those who can help.
It worked, thank you very much.
– Luis Violas
In this case you are just taking the name and contact number, but you have other columns, being possible you get the return of all of them in the method
GetColumnNames()
that will return an array of strings with all possible column names– Kelwin Sanches Savoia
but it will also depend on what I put in mine
contactPickerIntent
, in my example only returns the email and the name, the number is 0.– Luis Violas
Exactly, if you want to take the number, the call should be made as follows:
var contactPickerIntent = new Intent(Intent.ActionPick,
 Android.Provider.ContactsContract.CommonDataKinds.Phone.ContentUri);
 //Start the contact picker expecting a result
 // with the resultCode '101'
 StartActivityForResult(contactPickerIntent, 101);
– Kelwin Sanches Savoia
but if I want to take the email and the number as I do?
– Luis Violas