Hi ,
Below are two different scenarios for sync.
Scenario 1: Manual sync ----- works fine
I am sending parameters to my rhoconnect server when i do a sync from my mobile application. Below is how it is achieved.
Rho.RhoConnectClient.doSyncSource('Operator',false,"employeeId="+ employeeId +"&deviceID=" + deviceID);
These parameters are received on my rhoconnect server's query method successfully in the following way.
resp.params.employeeId
resp.params.deviceID
The above scenario works fine when a manual sync happens.
Scenario 2 : Auto sync scenario --- Doesn't work as expected.
Auto sync is achieved by making the below changes in two files.
Rhomobile changes(Rhoconfig.txt)
sync_poll_interval=30
Rhoconnect server changes(settings.yml)
Model1:
:poll_interval: 30
Model2:
:poll_interval: 30
In the above scenario my rhomobile application is enabled to talk to the rhoconnect server every 30 seconds and the same way each model of my rhoconnect server can talk to my backend application every 30 seconds. But since the sync happens automatically the parameters "employeeId" and "deviceID" on rhoconnect server are "undefined". Hence i am not able to capture these fields in case of an auto sync.
I would like to access the employeeId and deviceID on my rhoconnect server when automatic sync happens.
If anyone can help me figure this part out then it would be greatly appreciated.
1 Replies
Hello Mohammed,
Instead of passing query string to rhoconnect server, you can store those value in redis during initial sync(which you will trigger after successfully loggedin using doSync method). And then you can fetch it when ever its required during auto sync.
Kindly find the store API documentation available at http://docs.rhomobile.com/en/5.1.1/rhoconnectapi/source-adapter-store-a…
Thanks