```
c.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            //Intent i = new Intent(ContactsContract.Contacts.CONTENT_TYPE);
            Intent i = new Intent(Intent.ACTION_PICK);
            i.setType(ContactsContract.Contacts.CONTENT_TYPE);
            startActivityForResult(i, CONTACT_PICKER_RESULT); }
        });
}
public void onActivityResult(int requestCode ,int resultCode ,Intent data) {
    if ((requestCode == CONTACT_PICKER_RESULT) && (resultCode == RESULT_OK)) {

    }

}

```

This code contains the intent opens the contacts but I need if select contact take a contact phone number then set it to string