I need to select contact numbers/emails from phone book in android.
I have seen selecting one contact and getting the result back in onActivityResult
from this link.
But I need multiple contacts to be selected from the phone book. How to achieve this?
I don't want to make my custom list, is there a way to use androids built in functionality?
Looks like there's no such 'official' way. Your question is basically the same as this one How to select multiple contacts with Android SDK which has reference to custom implementation.
If You check AOSP Contacts application, there's no such possibility neither in documentation. The only thing I've observed from the source of AOSP Contacts is the following mention (in com.android.contacts.activities.PeopleActivity):
From MMS app source code You can observe the following (in ComposeMessageActivity):
Field
Intents.ACTION_GET_MULTIPLE_PHONES
is available in ContactsContract.java but I wasn't able to find any usage of it across AOSP. So, I think it's some dead code or that action get handled in some closed code. I've tried the same way to launch contacts selection from my test application and got only exception about no application to handle the action.Of course, vendors Contacts applications provide such abilities (e.g. then selecting messages recipient), but it's better not to rely on them.
I am sharing code for select multiple contact from Phone Book. you have change little bit and you can achieve your goal. thanks