Closed the-dimensionless closed 3 years ago
Please share your code, I don't know which method you are using. Also feel free to add this scenario to the example app to make sure we get it working.
getContactsByPhoneNumber(string) is the method used.
Say number in Phone is '074 350 2341', i calll getContactsByPhoneNumber('0743502341'), [] list is returned. Is there a way that we can match numbers after ignoring their formatting ?
@the-dimensionless what you see in the readme is what you get. If you want a different api please propose it and submit a PR implementing it.
This issue is stale, please provide more information about the status
Suggestion:
The possible search method can be, getContactsByPhoneNumber('0743502341', true)
or getContactsByPhoneNumber(mobileNumber', mobileNumber.length> 3)
the expected change to the library is as follows
// getContactsByPhoneNumber(mobileNumber: string, isSearchInNativeFormat: bool)
If modified our function in this way, then our function work as follows Step 1: Convert normal mobile number (0743502341) to formatted mobile number (123-456-7890). Step 2: Do a search query with the formatted mobile number (123-456-7890). Step 3: Return matched results.
Any more suggestions are appreciated, Thanks.
If a = '1234567890' and contact is '123-456-7890', get contact by search string does not return the contact