How can we check status document (synchronized or not ) in couchbase Lite


#1

When I add a new document in the off-line mode the document not synchronized , how can I check whether document synchronize to sever or not ?


#2

The iOS/Mac implementation has a method CBLReplication.isDocumentPending that does this (in versions 1.2+.) I don’t think it’s been ported to the other implementations yet.


#3

Hi jens,

I’m appriciate that you reply so quickly. :grinning:

Actually I,m making an (file Upload App) with Android , I wonder how can I check whether the document :

  1. Sent to Sync gateway or not ?
  2. Sync gateway sent it to Server or not?

As you suggest I see In replication changed_event it have isDocumentPending method.
@Override
public void changed(Replication.ChangeEvent event) {
Replication replication = event.getSource();
replication.isDocumentPending();
}

We can use it to check pending document at Sync_gateway when we create document ? Is it true ?


#4

It looks like isDocumentPending has been implemented in Java, at least on the master branch. So yes, you should be able to use it.


#5

Dear Jens,

I know you have alot of problems to resolve , :slight_smile:

If you have more free times, could you please write a tut or some code for me . So I can refer and follow it quickly.

Thanks you so much!


#6

Sorry, my Java is way too rusty to attempt this, and I don’t have the free time.


#7

Thanks jens at all with your support !