BackgroundTaskCancellationReason enumeration

Applies to Windows and Windows Phone

Specifies the reasons for cancelling a background task.

Syntax


var value = Windows.ApplicationModel.Background.BackgroundTaskCancellationReason.abort;

Attributes

[Version(0x06020000)]

Members

The BackgroundTaskCancellationReason enumeration has these members.

MemberValueDescription
Abort | abort0

The background task was canceled by the application. This can happen for one of the following four reasons:

  • The task is considered an idle task. This means that the background task is still running, but without doing anything – for example, a JavaScript task that does not call the close() function.
  • The background task uses the MaintenanceTrigger and the system transitions to DC (battery power).
  • The app unregisters the background task, in which case the task is cancelled if it is currently running.
  • The app that registered the background task is uninstalled while the task is running.
Terminating | terminating1

The background task was canceled because the application is about to be terminated due to system policy. The application should save any state that will be needed when the application restarts.

LoggingOff | loggingOff2

The background task was canceled because the user has logged off the system.

ServicingUpdate | servicingUpdate3

The background task was canceled because the application was updated.

IdleTask | idleTask4

The background task was canceled because it was active, but not doing any work.

Uninstall | uninstall5

The background task was canceled because the application was uninstalled.

ConditionLoss | conditionLoss6

The background task was canceled because one or more of its required conditions is no longer met.

SystemPolicy | systemPolicy7

The background task was cancelled because of system policy.

QuietHoursEntered | quietHoursEntered8

The background task was cancelled because the device entered the quiet hours period.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.ApplicationModel.Background
Windows::ApplicationModel::Background [C++]

Metadata

Windows.winmd

 

 

Show:
© 2014 Microsoft