Using Notifications to Enable Background Synchronization

Once in a while I get asked if the Sync Framework supports background synchronization based on network states. To this question I usually respond, that there is no direct support within Sync Framework to do this, however there are a lot of existing API's to help you enable this.

One example of this is the State and Notification API's (SNAPI) built into Windows Mobile to monitor network activity. Using this API, you can embed functionality to monitor the network state and initiate background synchronization based on connectivity. You can see an example of this in a notification sample I wrote about a year ago.

Within the API you are able to determine which type of network is available (e.g., Cradle, GPRS, WiFi, etc). With this information you might choose to optimize your synchronization. For example if you had a fast WiFi connection you might choose to synchronize all of your information. If you had a slower GPRS connection you might choose to only sync your most important data.

I have also started hearing from people that have been looking into Background Intelligent Transfer Service (BITS) as a method for implementing background synchronization on desktops and laptops.

There are certainly a number of other great API's available to help optimize your application and on this I would love to hear from you. If you have worked with any API's that you think are particualarly useful in a mobile environment, let us know.

Liam Cavanagh