BackgroundTransferService Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Enables the management of background transfer requests.

Inheritance Hierarchy

System..::.Object
  Microsoft.Phone.BackgroundTransfer..::.BackgroundTransferService

Namespace:  Microsoft.Phone.BackgroundTransfer
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

Syntax

Public NotInheritable Class BackgroundTransferService
public static class BackgroundTransferService

The BackgroundTransferService type exposes the following members.

Properties

  Name Description
Requests Gets an enumeration of all active transfer requests associated with the calling application.

Top

Methods

  Name Description
Add Adds a background transfer request to the queue.
Find Attempts to return the background transfer request with the specified ID.
Remove Attempts to remove the background transfer request with the specified ID.

Top

Remarks

Transfer requests are created and configured using the BackgroundTransferRequest class. The BackgroundTransferService is used to submit requests, remove requests from the queue, and retrieve active requests.

Each application can have 25 requests queued at a given time. Attempting to add a request after this limit has been reached will throw an exception. It is the responsibility of the application to remove requests from the queue by using the Remove(BackgroundTransferRequest) method after they have completed.

Capabilities

If you use this API in your app, you must specify the following capabilities in the app manifest. Otherwise, your app might not work correctly or it might exit unexpectedly.

ID_CAP_NETWORKING

Windows Phone 8, Windows Phone OS 7.1

For more info, see App capabilities and hardware requirements for Windows Phone 8.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Phone.BackgroundTransfer Namespace