Belgi
Belgi

Reputation: 15062

Android: How to let user choose contacts?

I have a button and in upon clicking it I want to let the user choose (multiple) contacts and than I'd like to know what contacts (and phone numbers etc') the user chose.

What is the code I should put in onClick and how do I get the contacts chosen by the uset ?

Upvotes: 1

Views: 2750

Answers (2)

Kurtis Nusbaum
Kurtis Nusbaum

Reputation: 30825

Here's a tutorial on how to make a contact picker. That should show you everything you need. For more information on the android contacts API checkout this documentation.

Upvotes: 3

Raz
Raz

Reputation: 9058

You should probably run a new activity which pulls the contacts of the phone and let's the users select multiple items(Gridview or listview). And you can receive the contacts by sending the result(id,name,phone etc) to the last activity (which receives it in onActivityResult).

Upvotes: 0

Related Questions