I have successfully established sync across android and ios devices running cordova apps with sync gateway. I am now facing few issues updating the UI when new change is pulled down by the app from SG.
I read about querying the _active_tasks api to get status of the replication in this post <https://groups.google.com/forum/#!searchin/mobile-couchbase/sync$20progress$20phonegap/mobile-couchbase/JRZbjSSDd8s/KB0nXk9PDv4J> but i am not sure how do i pass the continuous parameter to _active_changes API. What i want is someway to fire a event or do something whenever my cblite receives something new from SG so that i can call my code which updates my UI only when it receives new documents from SG. I tried the below code but it does not work. coax([config.server, "_active_tasks"], { continous: true }, function(err, tasks) { var me; for (var i = tasks.length - 1; i >= 0; i--) { if (tasks[i].task == id) { me = tasks[i]; } } console.log(me); }); The logic i have with me should be run only when there is a new document inserted in cblite from SG and not when changes are made to local cblite. Any ideas ? -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/a935389c-a39a-4488-a36f-52aa065ae415%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
