First, when using the SQLite database query, the method used for fuzzy query
Like
%: Indicates that there are 0 or more characters
_: Represents 1 characters
Second, remove the space in the contact phone number:
"Replace" (Data1, ', ') like ' 13_________ '
Third, to check the number format of mobile phone numbers
PublicLoader<cursor> Oncreateloader (intID, Bundle args) {String phone= "\" replace\ "(" + ContactsContract.CommonDataKinds.Phone.NUMBER + "," ', ') "; String expression= Phone + "like?" or "+ Phone +" like? or ("+ Phone +" like?) and "+ Phone +" not like?) " + "or" + Phone + "like?" or "+ Phone +" like? or ("+ Phone +" like?) and "+ Phone +" not like?) " + "or" + Phone + "like?" or "+ Phone +" like? or ("+ Phone +" like?) and "+ Phone +" not like?) "; String[] Filter=Newstring[]{"13_________", "18_________", "15_________", "154________", "013_________", "018_________", "015_________", "0154________", "+8613_________", "+8618_________", "+8615_________", "+86154________"}; Cursorloader Cursorloader=NewCursorloader (invitepeopleactivity. This, ContactsContract.CommonDataKinds.Phone.CONTENT_URI, new string[]{ ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.NUMBER}, expression, Filter,contactscontract.commondatakinds.phone.display_name); returnCursorloader;}