Consider these recommendations when implementing resumable
synchronization.
- Set a max resume-attempt in your code so the application does not
continuously try to resume and fail for the same reason. If the max count is
reached, the sync is canceled.
- Check for connectivity before attempting to resume the
synchronization. The code can be implemented to wait a short time to recheck
connectivity, along with a timeout period to wait a sufficient amount of
time.
- Add code that obtains a flag indicating that the sync is
disabled when interruption occurs because the application code disables or
cancels the synchronization for any reason. For example, the application is
running in the background, and you want to resume only when the application
is running in the foreground.