How to make a LIKE query.

0 votes
Hi I am trying to query for mobile numbers. +919000000000 or 9000000000 i.e %9000000000

Query"."+ModelPhone.KEY_MOBILE, "%"+mobile, Operator.LIKE);

It is not working.

Please help.
asked Jun 25, 2015 in App42 Cloud API-BaaS by android.dreamscapeme (11 points)

1 Answer

0 votes

Thanks for sharing build statement to resolve this, you need to remove the "%" operator from query. It will work for you. If you still face any issue, then please share the sample JSON and internal logs of findDocumentByQuery method which you are using. It will help us to provide better support from our end.

To print the intenal logs, put the below line of code before making a fetch call:



Himanshu Sharma
answered Jun 25, 2015 by hs00105 (2,005 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on