Offline sync

Offline sync can be enabled to use mobile application data when it is offline and not connected to the Internet. It can be achieved with a combination of the Mobile App SDK on the client and the backend API on the server. This is helpful for devices that are not always connected to the Internet and need to store some data locally while they are offline. A good example is the Courier service app, which takes the user's signature on the device and stores the signature in the local database. When workers are connected to the Internet, that information is pushed to the backend.

To enable the local data store in Mobile App, Mobile App comes with out-of-the-box boilerplate code, which uses SQLLite for local storage of data. But you can change it if you want to use some other technology for local database storage.

For example, if we create a Xamarin (Android) application from the Azure portal, we can download the code and enable offline syncing by just enabling the defined directive, OFFLINE_SYNC_ENABLED.

After enabling the offline sync, the first sync is done when the client's application is first started and the local database is set up. The Mobile App retrieves the data from the server, and stores it in the local store. Any changes or database operations performed on the app will store it first to the local storage, and then sync to the server. This way, the app behaves seamlessly without showing any delay or error. Syncing data is done through the Mobile App SDK, and can be used to detect conflicts and to resolve those conflicts.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.93.236