Rui Peres
Rui Peres

Reputation: 25907

Get a contact phone number

When i open my contact list i want to able to select a person and get his(her) number. At the moment i can open the contact list, also, i have a onActivityResult witch is being fired when i select a person. The code is:

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == PICK_REQUEST) {
        if (resultCode == RESULT_OK) {
            //get the selected person's phone number.
        }
    }
}

Upvotes: 0

Views: 1010

Answers (1)

broschb
broschb

Reputation: 5006

take a look at this other post. You will need to call startActivityForResult, and then query the result for the phone number.

Upvotes: 1

Related Questions