I'm creating an application where the user will click on a EditText
which will take you to the system contact list, where it will click and the name of the contact will appear in EditText
. However, it is precisely to get this contact and fill in the EditText
that I am caught. My code is this:
Comvoce3 = (EditText) findViewById(R.id.Comvoce);
Comvoce3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intentList = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);
startActivityForResult(intentList, RESULT_PICK);
Comvoce3.setHint("");
}
});