2 Replies Latest reply on Jul 2, 2015 11:37 PM by Mohammed Aamir K

    Auto sync : Passing parameters to Rhoconnect server.

    Mohammed Aamir K

      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.