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;
request.TransferProgressChanged += HandleTransferProgressChanged;
}
3.133.155.216