O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Background File Transfer Sample Code

The sample for this chapter continues from where we left off in Chapter 32, “Conducting Background Activities with Scheduled Actions.” This chapter looks at backing up the to-do items database to a remote server using WCF.

Within the BackgroundAgents solution in the downloadable sample code is a project named WPUnleashed.BackgroundAgents.Web. This project exposes a WCF service named BackupService, which allows the phone app to save files to the Backups directory on the server by way of its SaveFile method (see Listing 33.1). The SaveFile method accepts a Stream, which is written to a file on the server. The unique ID of the user is also sent to the server to allow correct retrieval of the file at a later ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required