Search code examples
javaandroidandroid-sqlitesymmetricds

symmetricDS android and server setup


I have been trying to setup symmetric server on my laptop and sync sqlite db with mysql database.

The android is same as explained in below example : http://jumpmind.com/blog/synchronizing-android-applications-part1

and for symmetric server setup i followed following link: http://www.symmetricds.org/doc/3.5/html/tutorial.html

My question here is how do i setup the server and what parameter should i pass in external id and node group in android applications . Could someone chalk out correct way to setup the server bcoz i tried above tuts for setting up the server but i kept getting error external id value is corp setup parameter is store.

and same for android side too.


Solution

  • My application has 2 clients (node111 and node222) configured as follows:

    APP1

    intent.putExtra(SymmetricService.INTENTKEY_EXTERNAL_ID, "node111");
    intent.putExtra(SymmetricService.INTENTKEY_NODE_GROUP_ID, "clientM");    
    

    APP2

    intent.putExtra(SymmetricService.INTENTKEY_EXTERNAL_ID, "node222");
    intent.putExtra(SymmetricService.INTENTKEY_NODE_GROUP_ID, "clientM");    
    

    You have to register both nodes on the server as follows: symadmin --engine databaseName open-registration clientM node111 and symadmin --engine databaseName open-registration clientM node222