Question

I wanna make enable to choose multiple contact number from contact list

I use this code for call caontact list

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE);

and on action result

    if (data != null) {
                    Uri uri = data.getData();
                    if (uri != null) {
                        Cursor c = null;
                        try {
                            c = getContentResolver()
                                    .query(uri,
                                            new String[] { ContactsContract.CommonDataKinds.Phone.NUMBER },
                                            null, null, null);

                            if (c != null && c.moveToFirst()) {
                                String tmp = c.getString(0);
}

but I just can select one number !

how can I make list of contact multiple selection ?

Was it helpful?

Solution

There is no such like multiple contact picker in Android SDK, instead we usually make a custom implementation (i.e. by making activity with listView). As said in this link, there's no such 'official' way to do this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top