BackgroundTransferGroup BackgroundTransferGroup BackgroundTransferGroup BackgroundTransferGroup Class

Definition

A named group used to associate multiple download or upload operations. This class makes it easy for your app to create these groups and to complete downloads and uploads simultaneously, in serial, or based on priority.

For example, if a user decides to download and watch episodes from a popular television series, your app can prioritize the earliest episodes in the series or let the user choose which episode to download first.

public : sealed class BackgroundTransferGroup : IBackgroundTransferGrouppublic sealed class BackgroundTransferGroup : IBackgroundTransferGroupPublic NotInheritable Class BackgroundTransferGroup Implements IBackgroundTransferGroup// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

A BackgroundTransferGroup object can persist to support transfer operations that span app sessions. New methods have been introduced to BackgroundDownloader, BackgroundUploader, DownloadOperation, and UploadOperation to simplify accessing groups created in a previous app session.

Note

Up to 50 unique transfer groups per app are supported.

Properties

Name Name Name Name

Gets the name of the group.

public : PlatForm::String Name { get; }public string Name { get; }Public ReadOnly Property Name As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The group name.

TransferBehavior TransferBehavior TransferBehavior TransferBehavior

Gets or sets the property used to specify if transfers within this group run simultaneously or in serial. Possible values are defined by BackgroundTransferBehavior.

public : BackgroundTransferBehavior TransferBehavior { get; set; }public BackgroundTransferBehavior TransferBehavior { get; set; }Public ReadWrite Property TransferBehavior As BackgroundTransferBehavior// You can use this property in JavaScript.

Remarks

When using Background Transfer during development, you may get into a situation where the internal caches of active and completed transfer operations can get out of sync. This may result in the inability to start new transfer operations or interact with existing operations and BackgroundTransferGroup objects. In some cases, attempting to interact with existing operations may trigger a crash. This result can occur if the TransferBehavior property is set to Parallel. This issue occurs only in certain scenarios during development and is not applicable to end users of your app. For more Information, see the Debugging Guidance section in BackgroundDownloader and BackgroundUploader.

Methods

CreateGroup(String) CreateGroup(String) CreateGroup(String) CreateGroup(String)

Creates a transfer group using the provided group name.

public : static BackgroundTransferGroup CreateGroup(PlatForm::String name)public static BackgroundTransferGroup CreateGroup(String name)Public Static Function CreateGroup(name As String) As BackgroundTransferGroup// You can use this method in JavaScript.
Parameters
name
PlatForm::String String String String

The name of the group. If a group with the this name already exists, this method will return a reference to the existing group object.

Returns

Remarks

A BackgroundTransferGroup object can persist to support transfer operations that span app sessions. New methods have been introduced to BackgroundDownloader, BackgroundUploader, DownloadOperation, and UploadOperation to simplify accessing groups created in a previous app session.

Note

Windows 8.1 and Windows Server 2012 R2 support a maximum of 50 unique transfer groups for the entire system. So an app should reuse a unique ID or a small number of unique IDs for all transfer groups created by the app. If more than 50 transfer groups are created on the system, the app will get in an unrecoverable state.