I am trying to search for contacts on basis of their display name. I have taken the reference from sample code given on the android developer site.
https://developer.android.com/training/contacts-provider/retrieve-names.html
In this sample, search performs from the whole contacts details present in contact not only from contacts name.
For example if a user has an email address in his contacts, then the search is performing in matching the emails as well. or if a number is stored in home type, then while typing h, the number present in home category also shown up.
I want search to be limited to their display name.
final static String SELECTION =
(Utils.hasHoneycomb() ? Contacts.DISPLAY_NAME_PRIMARY : Contacts.DISPLAY_NAME) +
"<>''" + " AND " + Contacts.IN_VISIBLE_GROUP + "=1";
These is the selecton clause that i am using taken from sample code.