Chapter 33. Performing Background File Transfers

,

In This Chapter

Image Downloading and uploading files asynchronously in the background

Image Handling app termination and background request event resubscription

Image Using URL routing to pass information to the server during a background transfer request

Image Retrieving the user’s Windows Live anonymous ID

Image Monitoring a background transfer request using a progress indicator


When developing a phone app, your app may need to transfer files to or from a remote server. In some cases your app may not be able to continue without having a certain file on hand. But in other cases, the file may not be required immediately and can be downloaded asynchronously using a background file transfer. Candidates for these kinds of file transfers include downloading large files (for example, music and video files) or backing up an app’s local database.

Transferring files from a foreground app can be problematic because of the transient nature of an app’s run cycle; if your app is tombstoned or terminated, any file transfers under way are interrupted. Background file transfers allow your app to download or upload files asynchronously and remain active even if your app is terminated while still allowing your app to monitor the progress of the transfer.

The previous chapter looked at background actions and how a to-do list app uses a local database to store to-do item information. This chapter continues with the to-do list sample, and you see how to back up and restore the to-do list local database using a background transfer request. The chapter examines how to leverage the URL routing features of ASP.NET to pass arguments to a WCF service via a background transfer request, and you see how to retrieve the user’s Windows Live anonymous ID. Finally the chapter looks at monitoring a background transfer using a progress indicator.

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

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