Telerik UI for Windows Phone by Progress

The Telerik Cloud Synchronization mechanism allows you to manipulate the data when no Internet connection is available and synchronize it at a later stage when connection is possible. The following topic describes how to safely work with your data when offline and make sure changes are correctly synced when online.

Working in Offline mode

The SynchronizationContext class exposes the AddAsync, UpdateAsync and DeleteAsync methods which operate over the data currently managed by the context. These methods do not require Internet connection and they can be called safely in your application in cases of lost connectivity to update the data status. What these methods do is:

  • AddAsync - adds a new ISynchronizableCloudItem implementation to the SynchronizationContext and schedules it for server upload
  • UpdateAsync - locally stores the changes in an existing ISynchronizableCloudItem implementation and marks it as dirty for server upload
  • DeleteAsync - marks an existing ISynchronizableCloudItem implementation as deleted and schedules it for server deletion.

Working in Online mode

The SynchronizeAsync method exposed by the SynchronizationContext class starts a synchronization procedure which needs Internet access to be able to synchronize the local data set with its cloud counterpart. This method does not check for Internet access so you will need to do this separately.