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.
Asked
Active
Viewed 485 times
2 Answers
0
You might wanna have a look at this: How to call Android contacts list?
There are three steps basically.
- Add Read Contacts Permission in your Manifest
- Call the Contact Picker with the right intent and
startActivityForResult(..)
- 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