I am trying to create a general search tool for android.
res/menu/searchview_in_menu.xml
Contacts Provider API Guide
Contacts Training
Steve
Steve Luke wrote:Searching contacts should be done via the ContactProvider. Here are some links on how:
Contacts Provider API Guide
Contacts Training
Thanks You for the reply Steve. What I am trying to create is a general search tool for android, can you gimme some pointers about what will be the best way to implement it.
Thanks & Regards
Mustafa I. Dasorwala
Steve Luke wrote:Searching contacts should be done via the ContactProvider. Here are some links on how:
Contacts Provider API Guide
Contacts Training
Also i would appreciate if you could tell me why the current code fails when I use "com.android.contacts" cause just like applications, contacts too are present in the searchables list.
Thanks.
Also, you still need permissions to get at contact data - did you request the proper permissions in your manifest?
Steve
Steve Luke wrote:Not, sure, can't say I have tried global searches - I just do contact specific searches. So I went to the SearchManager API and read it, and it says you will rarely ever need to interact with it, and that you should prefer using ACTION_SEARCH intents. This fires an intent that pings all apps and contexts that are searchable, so perhaps you should try to use that first.
Also, you still need permissions to get at contact data - did you request the proper permissions in your manifest?
Ya I did , both read and write permissions. I guess I'll use a different approach to solve the search problem.
Thanks Steve.

It is sorta covered in the JavaRanch Style Guide. |