When I synchronize data to Backless through restAPI in the background of the system, new, edit and delete can be seen result in the web page, but my Android device can trigger somtimes, At other times does not trigger the listener, check the statistics, RT service API calls are increased.
here is my call code:
There is another problem, I add the listener can only obtain the data changes after the application installation, but I also need to download some data before the device installation, how should I operate?
I’m sorry, but it’s a little unclear to me exactly what the problem is.
Could you clarify your question, perhaps give an example of what you are trying to do?
My listeners don’t fire most of the time, even when the network is in good condition, and update listeners don’t fire, regardless of which table’s data changes
When you write that the “listeners don’t fire most of the time”, when exactly do they not work? Is the data always updated using the Rest API? Please note that the handler will not be triggered if the data has been updated using the Cloud Code API key. Please make sure you are not using this API key for the update operations.
yes, i sure update date use the Rest API, and every table use same way to add listener,but listeners not be triggered,and then,they be triggered only sometimes
modified the data of the table in the website, but my mobile phone did not receive the notification, so THAT I could process the data on the mobile phone
but if i remove “queryClause”,I have the same problem. My device cannot receive push notifications about the addition, modification and deletion of some data
Have you checked Condition Syntax.?
Perhaps it should be something like this queryClause = "mch_id = " + "'" + mch_id + "'"?
Can you show us one example of what queryClause is equal to?
Have you added logging to handleFault? Do you receive some errors here?
My device cannot receive push notifications
Perhaps you sealed yourself and meant listeners?
Please, provide us with your code. Tell us what do you specifically do when waiting for the RT notification in the listener?