BackgroundTaskRegistrationGroup BackgroundTaskRegistrationGroup BackgroundTaskRegistrationGroup BackgroundTaskRegistrationGroup BackgroundTaskRegistrationGroup Class

Definition

Provides grouping semantics so that background task registration can be maintained separately.

public : sealed class BackgroundTaskRegistrationGroup
struct winrt::Windows::ApplicationModel::Background::BackgroundTaskRegistrationGroup
public sealed class BackgroundTaskRegistrationGroup
Public NotInheritable Class BackgroundTaskRegistrationGroup
var backgroundTaskRegistrationGroup = new backgroundTaskRegistrationGroup(id);
Attributes

Windows 10 requirements

Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Examples

Background activation sample
Background task sample See scenario 6 for a grouped task example.

Remarks

Developers are encouraged to unregister, and then register, all background tasks used by the application when the app launches. However, in addition to unregistering the app's background tasks, this can also unregister background tasks registered by frameworks used by the app.

Grouped background task registration provides roughly the equivalent of a namespace for background tasks. You can register/unregister background tasks that belong to a group that you define without disturbing the registration of other background tasks on the device.

Constructors

BackgroundTaskRegistrationGroup(String) BackgroundTaskRegistrationGroup(String) BackgroundTaskRegistrationGroup(String) BackgroundTaskRegistrationGroup(String) BackgroundTaskRegistrationGroup(String)

Creates a BackgroundTaskRegistrationGroup with the specified group ID.

BackgroundTaskRegistrationGroup(String, String) BackgroundTaskRegistrationGroup(String, String) BackgroundTaskRegistrationGroup(String, String) BackgroundTaskRegistrationGroup(String, String) BackgroundTaskRegistrationGroup(String, String)

Creates a BackgroundTaskRegistrationGroup with the specified group ID and

Properties

AllTasks AllTasks AllTasks AllTasks AllTasks

Gets all of the background tasks that belong to the group.

Id Id Id Id Id

Gets the group ID.

Name Name Name Name Name

Gets the friendly name of the group.

Events

BackgroundActivated BackgroundActivated BackgroundActivated BackgroundActivated BackgroundActivated

This event is fired when a background task that belongs to a group starts.