Is there any way to auto sync the data in the demo rhoconnect app i.e without clicking the sync button !!

// Expert user has replied.
V Vedsatx Saddvv 3 years ago
0 5 0

I have tried the rhoconnect demo app and it is working fine. Is there any way to auto sync the data from application to sever? i.e without clicking the sync button on the top!

Please register or login to post a reply

5 Replies

M Mohammed Aamir K

Hi ,

From what has been observed by me the minimum sync duration in your settings.yml should be 30 seconds. If the value is anything less than that it doesn't trigger the sync.

The changes you need to make automatic sync work.

Change 1 : Rhomobile (Rhoconfig.txt)

sync_poll_interval=30 

Change 2 : Rhoconnect server (settings.yml)

Model1: 
     :poll_interval: 30 
Model2: 
     :poll_interval: 30

After the above changes your rhomobile application will start autosyncing your models.

A Abhilash MB

And i am also trying to set/change the "poll interval" in settings.yml  in the rhoconnect server app, but i am not seeing any sync happening according to the given duration.

A Abhilash MB

And i did not quite get what you said. i don't want to add a button for sync

P Pietro Francesco Maggi

A sync is initiated with a call to the API rhoconnectclient doSync method:
http://docs.rhomobile.com/en/5.1.1/api/RhoConnectClient#mdoSync

Which demo application are you talking about, the scafolded one?

For the Scafolded application, if I remember correctly we've a periodic sync plus the button in the home page of the app.
But really, you can add a button where you want and call the doSync method or included the call in your workflow. Is up to you.

~Pietro

A Abhilash MB

Store server demo application which they have demonstrated in documentation. I want to do auto sync of the data, as soon as i create a product it should be displayed on that heroku server

CONTACT
Can’t find what you’re looking for?