1
votes

Below is one of the features of Azure Mobile Apps - Office Data Sync

When your app is in offline mode, users can still create and modify data, which will be saved to a local store. When the app is back online, it can synchronize local changes with your Azure Mobile App backend.

As per the above, does that mean the synchronization of the local changes happens only when the app is online (user needs to explicitly open the app)? Or the data gets synchronized to server automatically when the mobile connects to internet via some background service?

2

2 Answers

2
votes

For an overview of offline data sync, see Offline Data Sync in Azure Mobile Apps, particularly How offline synchronization works.

The SDK does not do anything automatically with regard to the sync operation itself. You have to either add code that syncs on a timer, or detects network connectivity changes. If you want to sync as a background task, you will have to register the sync code with the OS and call PullAsync and PushAsync in that code.

Basically, the SDK tracks changes for you and sends them when you call PushAsync, but your code manages when this happens.

0
votes

As the document says:

Changes are stored in a local database; once the device is back online, these changes are synced with the remote backend.

Which means user should open the app first before syncing data.