I recommend you to implement the sync gategay following the next steps:
Get one bucket for data and one bicket for sync gateway. You can follow instructions here:
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.
- 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.