How to Tell When Replication Complete in Couchbase Lite

Looking for a good way in iOS and Android to detect when replication of my db is complete? I have a way of monitoring each time there is a push and pull of live replication, but what would be the best way to detect when the two db seem to be caught up?

How about making use of the changed event on the replication? It will give you details on the number of scheduled and finished changes, as well as the status of the replicator (active / offline / idle / stopped).

If the replication is in continuous mode and no authorization(session id is wrong or expired), currently seems we can not know the situation by querying active tasks.

I could be nice if some event mechanism can be implemented for reporting replication status.

if some event mechanism can be implemented for reporting replication status

That’s exactly what the Changed event is for.

Thanks borrrden for the info!

My app is hybrid app using couchbase lite cordova plugin, I can not find correspondent REST API for that, missing documentation?

You can find the replication status and change progress on the /_active_tasks endpoint.
See slide 27 onwards.

James