Search code examples
androidandroid-contactscontactscontract

Query to android contacts using REGEX expression


I want to make search module just like android keypad that gives the list of contacts with starts with number as well as starts with the text of the keypad user types. basically i want to search contacts with display name as well as number also as android native app is giving the result.

I have made the regular expression dynamically but i have only problem is how can i query to contacts with regular expression?


Solution

  • Android doesn't support this style of querying the contacts list but it seems to me it would be practical and easy to read all the contact information in the standard way and just throw away the results that don't match your regex.