Sunday, January 1, 2012

[android-developers] Using contacts picker with filtering

Hi all,

I'm using the following code to launch the Contacts Picker:

Intent intent = new Intent(Intent.ACTION_PICK,
ContactsContract.Contacts.CONTENT_URI);
//another display style:
//intent.setType
(android.provider.ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE);
startActivityForResult(intent, 1);

It works, but I would like to add filtering such that some contacts
are not shown. My desired display criterion is:

- Only show contacts that have Home phone, Work phone, Mobile phone or
Pager.

Contacts that have only Work Fax, E-mail, etc etc should not be
shown.

Is it possible to add such filtering? Thank you.

Regards,
Eric

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment