AppResourceGroupBackgroundTaskReport AppResourceGroupBackgroundTaskReport AppResourceGroupBackgroundTaskReport AppResourceGroupBackgroundTaskReport Class

Definition

Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Prerelease APIs are identified by a Prerelease label.

[Contains prerelease APIs.]
Provides snapshot information about a background task such as its name, trigger name, entry point name, and task identifier.

public : sealed class AppResourceGroupBackgroundTaskReport : IAppResourceGroupBackgroundTaskReportpublic sealed class AppResourceGroupBackgroundTaskReport : IAppResourceGroupBackgroundTaskReportPublic NotInheritable Class AppResourceGroupBackgroundTaskReport Implements IAppResourceGroupBackgroundTaskReport// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16257.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)
Capabilities
appDiagnostics

Properties

EntryPoint EntryPoint EntryPoint EntryPoint

Prerelease. Gets the name of the background task entry point.

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

The name of the entry point as specified in the app manifest.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16257.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)
Capabilities
appDiagnostics

Remarks

The entry point string is taken from the definition in the manifest. For example, the EntryPoint string will be "Tasks.BackgroundTaskClass" for a manifest that contains the following declaration:

<Extension Category="windows.backgroundTasks" EntryPoint="Tasks.BackgroundTaskClass">

    <BackgroundTasks>

        <Task Type="systemEvent" />

        <Task Type="pushNotification" />

    </BackgroundTasks>

</Extension>

For JavaScript tasks, the entry point string is taken from the value of the StartPage attribute in the background task registration. For example, the entry point string will be "js\completionGroupBackgroundTask.js" for a manifest that contains the following declaration:

<Extension Category="windows.backgroundTasks" StartPage="js\completionGroupBackgroundTask.js">

  <BackgroundTasks>

    <Task Type="general" />

  </BackgroundTasks>

</Extension>

Name Name Name Name

Prerelease. Gets the name of the background task.

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 background task name.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16257.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)
Capabilities
appDiagnostics

Remarks

This is the name supplied by the app when it registered the task with BackgroundTaskBuilder

Some background tasks do not have names and will return an empty string because they are not explicitly registered. For example, background audio playback tasks and app-service tasks.

TaskId TaskId TaskId TaskId

Prerelease. Gets the background task's identifier.

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

The background task GUID.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16257.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)
Capabilities
appDiagnostics

Remarks

The identifier is an internally generated session-unique identifier. You can use it to disambiguate multiple background task instances.

Trigger Trigger Trigger Trigger

Prerelease. Gets the name of the trigger that activated this task.

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

The name of the trigger.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16257.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)
Capabilities
appDiagnostics

Remarks

If the task is activated by a trigger, then this will be the trigger type name; otherwise it will be an internally-generated string that identifies the activation behavior. For example, the trigger string would be "Windows.ApplicationModel.Background.ActivitySensorTrigger" if an app set a background task trigger in code like this:

var builder = new Windows.ApplicationModel.Background.BackgroundTaskBuilder;
builder.SetTrigger(new Windows.ApplicationModel.Background.ActivitySensorTrigger(50));