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

Handling App Termination and Resubscription to Transfer Events

When a BackgroundTransferRequest has been added to the BackgroundTransferService, you can store the value of the request’s RequestId property in isolated storage. This enables you to retrieve the request later if your app is terminated, and to continue monitoring the progress of your background request by resubscribing to the request’s TransferStatusChanged and TransferProgressChanged events.

The BackgroundTransferService.Find method is used to retrieve an existing request, like so:

BackgroundTransferRequest request        = BackgroundTransferService.Find("request id string");if (request != null){    request.TransferStatusChanged += HandleUploadTransferStatusChanged; ...

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