Configure Sync_gateway with couchbase-lite Android

Hello @jislam150.

I recommend you to implement the sync gategay following the next steps:

  1. Get one bucket for data and one bicket for sync gateway. You can follow instructions here:
    http://www.chadstechnoworks.com/wptech/db/couchbase_mobile_sync_gateway.html

  2. Create one user in sync database in order to test your application. The user must have privileges to write and read all channels for testing purpouses. After you have tested you can change the security.

https://developer.couchbase.com/documentation/mobile/1.1.0/develop/guides/sync-gateway/administering-sync-gateway/authorizing-users/index.html

  1. Create documents in the mirror database with one channel and see how they replicate on Android, and the other way back. In order to update or delete your documents correctly, take in count you need to pass the proper channel (and have admin privileges on document), you must provide the proper revision and the document must parse to JSON.

One recommedation when you test with curl I suggest to write the json in a file and use curl … -d @document.json … so you can avoid spelling mistakes.

Hope these advices help you.