0

I want to create a control on a user form so that whenever i click on it, my phones contact list is shown with Search , indexing and grouping functionality same as android contact application and i would pick any contact and return to my form.

Daniele
  • 1,005
  • 9
  • 26
Naveen Chauhan
  • 2,026
  • 8
  • 33
  • 40

2 Answers2

0

You might wanna have a look at this: How to call Android contacts list?

There are three steps basically.

  1. Add Read Contacts Permission in your Manifest
  2. Call the Contact Picker with the right intent and startActivityForResult(..)
  3. Listen for the result from the Contacts Intent. And process it any way you want.
Community
  • 1
  • 1
Ashok Goli
  • 5,043
  • 8
  • 38
  • 68
  • It works fine when i use this in activtiy class but in my case i want to use this functionality in one of my fragment. In my fragment class. I am getting only a single error on managedQuery method; – Naveen Chauhan Jun 11 '12 at 10:28
  • getActivity().getContentResolver().query() instead of managedQuery. – Naveen Chauhan Jun 11 '12 at 11:04
0

User Android contact ContentProvider to access phone contact number and other information.

Thanks

Md Abdul Gafur
  • 6,213
  • 2
  • 27
  • 37