Windows.ApplicationModel.Background Windows.ApplicationModel.Background Windows.ApplicationModel.Background Windows.ApplicationModel.Background Windows.ApplicationModel.Background Namespace

Enables an app to schedule background tasks to run app code even when the app is suspended.

Background tasks are intended for small work items that do not require user interaction or for handling toast actions. Scenarios that are appropriate for background tasks include downloading mail, showing a toast notification for an incoming chat message, or reacting to a change in a system condition.

See Supporting your app with background tasks ( using JavaScript and HTML) or Support your app with background tasks for guidance on implementing background tasks. For example code that shows how to implement background tasks, see the Background Task Sample.


ActivitySensorTrigger ActivitySensorTrigger ActivitySensorTrigger ActivitySensorTrigger ActivitySensorTrigger

Represents a trigger that is activated when the ActivitySensor receives input. This is used when your application needs to respond to the activity sensor.

AlarmApplicationManager AlarmApplicationManager AlarmApplicationManager AlarmApplicationManager AlarmApplicationManager

Requests permission from the user to set alarms, and retrieves the status of user permission for the app to set alarms.

AppBroadcastTrigger AppBroadcastTrigger AppBroadcastTrigger AppBroadcastTrigger AppBroadcastTrigger

Represents an event that triggers a background task to run when an application starts gameplay broadcasting.

AppBroadcastTriggerProviderInfo AppBroadcastTriggerProviderInfo AppBroadcastTriggerProviderInfo AppBroadcastTriggerProviderInfo AppBroadcastTriggerProviderInfo

Provides information about the application that is broadcasting gameplay such as its logo, display name, and video characteristics.

ApplicationTrigger ApplicationTrigger ApplicationTrigger ApplicationTrigger ApplicationTrigger

This allows you to programmatically trigger a background tasks from within your application.

ApplicationTriggerDetails ApplicationTriggerDetails ApplicationTriggerDetails ApplicationTriggerDetails ApplicationTriggerDetails

The details of an ApplicationTrigger.

AppointmentStoreNotificationTrigger AppointmentStoreNotificationTrigger AppointmentStoreNotificationTrigger AppointmentStoreNotificationTrigger AppointmentStoreNotificationTrigger

Represents a trigger that launches a background task for processing changes to the appointment store.

BackgroundExecutionManager BackgroundExecutionManager BackgroundExecutionManager BackgroundExecutionManager BackgroundExecutionManager

Manage permission to run background tasks.

BackgroundTaskBuilder BackgroundTaskBuilder BackgroundTaskBuilder BackgroundTaskBuilder BackgroundTaskBuilder

Represents a background task to register with the system.

BackgroundTaskCompletedEventArgs BackgroundTaskCompletedEventArgs BackgroundTaskCompletedEventArgs BackgroundTaskCompletedEventArgs BackgroundTaskCompletedEventArgs

Represents completion information for a task at the time a completion notification is sent.

BackgroundTaskDeferral BackgroundTaskDeferral BackgroundTaskDeferral BackgroundTaskDeferral BackgroundTaskDeferral

Represents a background task deferral returned by the IBackgroundTaskInstance.GetDeferral method.

BackgroundTaskProgressEventArgs BackgroundTaskProgressEventArgs BackgroundTaskProgressEventArgs BackgroundTaskProgressEventArgs BackgroundTaskProgressEventArgs

Represents progress information for a task at the time a progress update notification is sent.

BackgroundTaskRegistration BackgroundTaskRegistration BackgroundTaskRegistration BackgroundTaskRegistration BackgroundTaskRegistration

Represents a background task that has been registered with the system.

BackgroundTaskRegistrationGroup BackgroundTaskRegistrationGroup BackgroundTaskRegistrationGroup BackgroundTaskRegistrationGroup BackgroundTaskRegistrationGroup

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

BackgroundWorkCost BackgroundWorkCost BackgroundWorkCost BackgroundWorkCost BackgroundWorkCost

Retrieves a hint about resource availability for background tasks. Background tasks can use this hint to decide how much work to do when they are activated.

BluetoothLEAdvertisementPublisherTrigger BluetoothLEAdvertisementPublisherTrigger BluetoothLEAdvertisementPublisherTrigger BluetoothLEAdvertisementPublisherTrigger BluetoothLEAdvertisementPublisherTrigger

Represents a trigger that is registered to advertise a Bluetooth LE advertisement in the background.

BluetoothLEAdvertisementWatcherTrigger BluetoothLEAdvertisementWatcherTrigger BluetoothLEAdvertisementWatcherTrigger BluetoothLEAdvertisementWatcherTrigger BluetoothLEAdvertisementWatcherTrigger

Represents a trigger that is registered to scan for Bluetooth LE advertisement in the background.

CachedFileUpdaterTrigger CachedFileUpdaterTrigger CachedFileUpdaterTrigger CachedFileUpdaterTrigger CachedFileUpdaterTrigger

Represents a trigger that launches a background task to enable the Cached File Updater contract.

CachedFileUpdaterTriggerDetails CachedFileUpdaterTriggerDetails CachedFileUpdaterTriggerDetails CachedFileUpdaterTriggerDetails CachedFileUpdaterTriggerDetails

Provides details about the cached file operation that invoked the trigger.

ChatMessageNotificationTrigger ChatMessageNotificationTrigger ChatMessageNotificationTrigger ChatMessageNotificationTrigger ChatMessageNotificationTrigger

Represents a trigger that is activated when there is a notification for a text message.

ChatMessageReceivedNotificationTrigger ChatMessageReceivedNotificationTrigger ChatMessageReceivedNotificationTrigger ChatMessageReceivedNotificationTrigger ChatMessageReceivedNotificationTrigger

Represents a trigger that launches a background task that handles any incoming message that might need to be filtered according to its content. For more information about filtering messages, see Windows.ApplicationModel.CommunicationBlocking.

CommunicationBlockingAppSetAsActiveTrigger CommunicationBlockingAppSetAsActiveTrigger CommunicationBlockingAppSetAsActiveTrigger CommunicationBlockingAppSetAsActiveTrigger CommunicationBlockingAppSetAsActiveTrigger

Represents a trigger to activate a communication blocking application when it is selected as the preferred blocking app.

A user can have multiple communication blocking applications installed at one time. This trigger is used to let an application know that it has been selected as the active communication blocking application. For more information about the communication blocking API, see Windows.ApplicationModel.CommunicationBlocking.

ContactStoreNotificationTrigger ContactStoreNotificationTrigger ContactStoreNotificationTrigger ContactStoreNotificationTrigger ContactStoreNotificationTrigger

Represents a trigger that launches a background task for processing changes to the contacts store.

ContentPrefetchTrigger ContentPrefetchTrigger ContentPrefetchTrigger ContentPrefetchTrigger ContentPrefetchTrigger

Provides the ability to run custom handlers when prefetching web resources.

CustomSystemEventTrigger CustomSystemEventTrigger CustomSystemEventTrigger CustomSystemEventTrigger CustomSystemEventTrigger

This class allows you to specify a custom system trigger so that you can register it and respond when it is triggered by the system.

DeviceConnectionChangeTrigger DeviceConnectionChangeTrigger DeviceConnectionChangeTrigger DeviceConnectionChangeTrigger DeviceConnectionChangeTrigger

Represents a trigger that launches a background task when the connection status of a device changes.

DeviceManufacturerNotificationTrigger DeviceManufacturerNotificationTrigger DeviceManufacturerNotificationTrigger DeviceManufacturerNotificationTrigger DeviceManufacturerNotificationTrigger

Represents a trigger that launches a background task to enable device manufacturer operations.

DeviceServicingTrigger DeviceServicingTrigger DeviceServicingTrigger DeviceServicingTrigger DeviceServicingTrigger

Represents an event that an application can trigger to initiate a long-running update (firmware or settings) of a device.

Windows 8.1 enables you to develop UWP app for your peripheral devices that communicate over USB, HID, and Bluetooth. For example, a user might need to sync content on a PC to or from the device, or perform a long-running update to the device itself like settings or firmware updates. Windows 8.1 provides two background tasks and corresponding APIs that allow your device to sync and update in the background: DeviceServicingTrigger and DeviceUseTrigger. This topic provides API reference information for DeviceServicingTrigger - for info on using this trigger in the context of a device app, see Device sync and update for UWP device apps.

The DeviceServicingTrigger background task allows your UWP app that interacts with your peripheral device to perform long running device updates while your app is suspended, for example settings transfers or firmware updates. Updating your device in the background requires user approval each time the background task is used. Unlike the DeviceUseTrigger background task, the DeviceServicingTrigger background task allows for device reboot and disconnect and allows a maximum of 30 minutes of background activity.

DeviceUseTrigger DeviceUseTrigger DeviceUseTrigger DeviceUseTrigger DeviceUseTrigger

Represents an event that a Windows Runtime app can trigger to initiate a long-running operation with a device or sensor.

DeviceUseTrigger lets your Windows Runtime app access sensors and peripheral devices in the background, even when your foreground app is suspended. For example, depending on where your app is running, it could use a background task to synchronize data with devices or monitor sensors.

This class can be used in UWP app and Windows Phone 8.x app. However, a DeviceUseTrigger background task supports different APIs, and is subject to different policies, depending where it's running (PC or phone). To learn more about these differences, see Accessing sensors and devices from a background task.


This trigger cannot be used with single-process background tasks.

For a sample that shows how to use DeviceUseTrigger on a PC, see the Custom USB device sample. For a phone sample, see the Background Sensors sample.

DeviceWatcherTrigger DeviceWatcherTrigger DeviceWatcherTrigger DeviceWatcherTrigger DeviceWatcherTrigger

Represents an event that causes a background task to run when changes occur to the list of devices. Returned by GetBackgroundTrigger.

EmailStoreNotificationTrigger EmailStoreNotificationTrigger EmailStoreNotificationTrigger EmailStoreNotificationTrigger EmailStoreNotificationTrigger

Represents a trigger that enables notification of changes to the email store.

GattCharacteristicNotificationTrigger GattCharacteristicNotificationTrigger GattCharacteristicNotificationTrigger GattCharacteristicNotificationTrigger GattCharacteristicNotificationTrigger

Represents a trigger that launches a background task when an incoming change notification is received for a Bluetooth LE GATT characteristic.

GattServiceProviderTrigger GattServiceProviderTrigger GattServiceProviderTrigger GattServiceProviderTrigger GattServiceProviderTrigger

Constructs a Generic Attributes (GATT) service that can be persisted in the background.

GattServiceProviderTriggerResult GattServiceProviderTriggerResult GattServiceProviderTriggerResult GattServiceProviderTriggerResult GattServiceProviderTriggerResult

This class contains the trigger created by GattServiceProviderTrigger.CreateAsync().

GeovisitTrigger GeovisitTrigger GeovisitTrigger GeovisitTrigger GeovisitTrigger

Represents an event that triggers a Visits-related background task.

LocationTrigger LocationTrigger LocationTrigger LocationTrigger LocationTrigger

Represents a location event that triggers a background task. This is used for Geofencing.

MaintenanceTrigger MaintenanceTrigger MaintenanceTrigger MaintenanceTrigger MaintenanceTrigger

Represents a maintenance trigger.

MediaProcessingTrigger MediaProcessingTrigger MediaProcessingTrigger MediaProcessingTrigger MediaProcessingTrigger

Represents a trigger that launches a background task for performing media processing.

MobileBroadbandDeviceServiceNotificationTrigger MobileBroadbandDeviceServiceNotificationTrigger MobileBroadbandDeviceServiceNotificationTrigger MobileBroadbandDeviceServiceNotificationTrigger MobileBroadbandDeviceServiceNotificationTrigger

Represents a trigger that activates when the network sends SIM tool commands. Apps receiving this notification then process the SIM tool commands.

This functionality is only available to mobile operator apps and UWP app given privileged access by mobile network operators. For more information, see Mobile Broadband: .

MobileBroadbandPcoDataChangeTrigger MobileBroadbandPcoDataChangeTrigger MobileBroadbandPcoDataChangeTrigger MobileBroadbandPcoDataChangeTrigger MobileBroadbandPcoDataChangeTrigger

Represents a cellular protocol configuration option change event that triggers a background task to run.

MobileBroadbandPinLockStateChangeTrigger MobileBroadbandPinLockStateChangeTrigger MobileBroadbandPinLockStateChangeTrigger MobileBroadbandPinLockStateChangeTrigger MobileBroadbandPinLockStateChangeTrigger

Represents a trigger that indicates when the SIM PIN lock state has changed.

This functionality is only available to mobile operator apps and UWP app given privileged access by mobile network operators. For more information, see Mobile Broadband: .

MobileBroadbandRadioStateChangeTrigger MobileBroadbandRadioStateChangeTrigger MobileBroadbandRadioStateChangeTrigger MobileBroadbandRadioStateChangeTrigger MobileBroadbandRadioStateChangeTrigger

Represents a trigger that indicates when mobile broadband radio state has changed. For example, this trigger activates when a mobile device transitions to or from airplane mode.

This functionality is only available to mobile operator apps and UWP app given privileged access by mobile network operators. For more information, see Mobile Broadband: .

MobileBroadbandRegistrationStateChangeTrigger MobileBroadbandRegistrationStateChangeTrigger MobileBroadbandRegistrationStateChangeTrigger MobileBroadbandRegistrationStateChangeTrigger MobileBroadbandRegistrationStateChangeTrigger

Represents a trigger that indicates when mobile broadband registration state has changed. For example, this trigger activates when a mobile device transitions to or from Roaming.

This functionality is only available to mobile operator apps and UWP app given privileged access by mobile network operators. For more information, see Mobile Broadband: .

NetworkOperatorDataUsageTrigger NetworkOperatorDataUsageTrigger NetworkOperatorDataUsageTrigger NetworkOperatorDataUsageTrigger NetworkOperatorDataUsageTrigger

Represents a trigger that launches a background task when the local data counters estimate that usage (bytes sent and received) on the mobile broadband interface has changed by an actionable threshold.


This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations, and Mobile Broadband.

NetworkOperatorHotspotAuthenticationTrigger NetworkOperatorHotspotAuthenticationTrigger NetworkOperatorHotspotAuthenticationTrigger NetworkOperatorHotspotAuthenticationTrigger NetworkOperatorHotspotAuthenticationTrigger

Represents a mobile network operator hotspot authentication trigger.


An app can only instantiate this object and register for the hotspot authentication event after a WLAN profile has been provisioned that references this app to handle hotspot authentication. For more info, see Windows 8 Integration for Wireless Hotspot Operators.

NetworkOperatorNotificationTrigger NetworkOperatorNotificationTrigger NetworkOperatorNotificationTrigger NetworkOperatorNotificationTrigger NetworkOperatorNotificationTrigger

Represents a mobile network operator notification trigger.

PaymentAppCanMakePaymentTrigger PaymentAppCanMakePaymentTrigger PaymentAppCanMakePaymentTrigger PaymentAppCanMakePaymentTrigger PaymentAppCanMakePaymentTrigger

This class represents a PaymentAppCanMakePayment trigger.

PhoneTrigger PhoneTrigger PhoneTrigger PhoneTrigger PhoneTrigger

Represents a phone event that triggers a background task.

PushNotificationTrigger PushNotificationTrigger PushNotificationTrigger PushNotificationTrigger PushNotificationTrigger

Represents an object that invokes a background work item on the app in response to the receipt of a raw notification.

RcsEndUserMessageAvailableTrigger RcsEndUserMessageAvailableTrigger RcsEndUserMessageAvailableTrigger RcsEndUserMessageAvailableTrigger RcsEndUserMessageAvailableTrigger

Represents a trigger that launches a background task when a new Rich Communication Services (RCS) message is available.

RfcommConnectionTrigger RfcommConnectionTrigger RfcommConnectionTrigger RfcommConnectionTrigger RfcommConnectionTrigger

Represents a trigger that launches a background task when an RFCOMM inbound or outbound connections are established.

SecondaryAuthenticationFactorAuthenticationTrigger SecondaryAuthenticationFactorAuthenticationTrigger SecondaryAuthenticationFactorAuthenticationTrigger SecondaryAuthenticationFactorAuthenticationTrigger SecondaryAuthenticationFactorAuthenticationTrigger

Represents a trigger that launches a background task on behalf of a companion device.

SensorDataThresholdTrigger SensorDataThresholdTrigger SensorDataThresholdTrigger SensorDataThresholdTrigger SensorDataThresholdTrigger

Represents a trigger that responds when a threshold limit for a sensor is crossed.

SmartCardTrigger SmartCardTrigger SmartCardTrigger SmartCardTrigger SmartCardTrigger

Represents an event triggered by a smart card.

SmsMessageReceivedTrigger SmsMessageReceivedTrigger SmsMessageReceivedTrigger SmsMessageReceivedTrigger SmsMessageReceivedTrigger

Represents a trigger that is raised when an SMS message has arrived.

SocketActivityTrigger SocketActivityTrigger SocketActivityTrigger SocketActivityTrigger SocketActivityTrigger

Represents a trigger that launches a background task for handling socket activity.

StorageLibraryChangeTrackerTrigger StorageLibraryChangeTrackerTrigger StorageLibraryChangeTrackerTrigger StorageLibraryChangeTrackerTrigger StorageLibraryChangeTrackerTrigger

Represents a file change within a StorageFolder that triggers a background task to run.

StorageLibraryContentChangedTrigger StorageLibraryContentChangedTrigger StorageLibraryContentChangedTrigger StorageLibraryContentChangedTrigger StorageLibraryContentChangedTrigger

Creates a trigger that will fire when a file is changed in a specified library.

SystemCondition SystemCondition SystemCondition SystemCondition SystemCondition

Represents a system condition that must be in effect for a background task to run.

SystemTrigger SystemTrigger SystemTrigger SystemTrigger SystemTrigger

Represents a system event that triggers a background task to run.

TetheringEntitlementCheckTrigger TetheringEntitlementCheckTrigger TetheringEntitlementCheckTrigger TetheringEntitlementCheckTrigger TetheringEntitlementCheckTrigger

Represents a tethering event that triggers a background task to run.

TimeTrigger TimeTrigger TimeTrigger TimeTrigger TimeTrigger

Represents a time event that triggers a background task to run.

ToastNotificationActionTrigger ToastNotificationActionTrigger ToastNotificationActionTrigger ToastNotificationActionTrigger ToastNotificationActionTrigger

Represents an event that causes a background task to run when the user performs an action on an interactive toast notification.

ToastNotificationHistoryChangedTrigger ToastNotificationHistoryChangedTrigger ToastNotificationHistoryChangedTrigger ToastNotificationHistoryChangedTrigger ToastNotificationHistoryChangedTrigger

Represents an event that causes a background task to run when the history of toast notifications for the app is cleared, when one or more toast notifications are added to or removed from the notification history for the app, or when one or more toast notifications for the app expire and are removed from the notification history.

UserNotificationChangedTrigger UserNotificationChangedTrigger UserNotificationChangedTrigger UserNotificationChangedTrigger UserNotificationChangedTrigger

Represents a trigger that fires when a UserNotification is added or removed.


IBackgroundCondition IBackgroundCondition IBackgroundCondition IBackgroundCondition IBackgroundCondition

Used to enforce the system condition object type.

IBackgroundTask IBackgroundTask IBackgroundTask IBackgroundTask IBackgroundTask

Provides a method to perform the work of a background task.

IBackgroundTaskInstance IBackgroundTaskInstance IBackgroundTaskInstance IBackgroundTaskInstance IBackgroundTaskInstance

Provides access to a background task instance.

IBackgroundTaskInstance2 IBackgroundTaskInstance2 IBackgroundTaskInstance2 IBackgroundTaskInstance2 IBackgroundTaskInstance2

Provides access to a background task instance. Inherits from the IBackgroundTaskInstance interface and adds the GetThrottleCount method.

IBackgroundTaskInstance4 IBackgroundTaskInstance4 IBackgroundTaskInstance4 IBackgroundTaskInstance4 IBackgroundTaskInstance4

Provides access to a background task instance including information about the user.

IBackgroundTaskRegistration IBackgroundTaskRegistration IBackgroundTaskRegistration IBackgroundTaskRegistration IBackgroundTaskRegistration

Provides access to a registered background task.

IBackgroundTaskRegistration2 IBackgroundTaskRegistration2 IBackgroundTaskRegistration2 IBackgroundTaskRegistration2 IBackgroundTaskRegistration2

Provides access to a registered background task. Inherits from the IBackgroundTaskRegistration interface and adds the Trigger property.

IBackgroundTaskRegistration3 IBackgroundTaskRegistration3 IBackgroundTaskRegistration3 IBackgroundTaskRegistration3 IBackgroundTaskRegistration3

Represents a background task that has been registered as part of a group of related background tasks.

IBackgroundTrigger IBackgroundTrigger IBackgroundTrigger IBackgroundTrigger IBackgroundTrigger

Represents the base interface for trigger events.


AlarmAccessStatus AlarmAccessStatus AlarmAccessStatus AlarmAccessStatus AlarmAccessStatus

Indicates whether the user has given permission for the app to set alarms.

ApplicationTriggerResult ApplicationTriggerResult ApplicationTriggerResult ApplicationTriggerResult ApplicationTriggerResult

The result of the request to trigger a background task. The RequestAsync method returns a value of this enumeration type.

BackgroundAccessRequestKind BackgroundAccessRequestKind BackgroundAccessRequestKind BackgroundAccessRequestKind BackgroundAccessRequestKind

Specifies the level of background activity that an app can request.

BackgroundAccessStatus BackgroundAccessStatus BackgroundAccessStatus BackgroundAccessStatus BackgroundAccessStatus

This enumeration specifies an app's ability to perform background activity.

Apps must successfully call BackgroundExecutionManager.RequestAccessAsync before registering background tasks.

BackgroundTaskCancellationReason BackgroundTaskCancellationReason BackgroundTaskCancellationReason BackgroundTaskCancellationReason BackgroundTaskCancellationReason

Specifies the reasons for cancelling a background task.

BackgroundTaskThrottleCounter BackgroundTaskThrottleCounter BackgroundTaskThrottleCounter BackgroundTaskThrottleCounter BackgroundTaskThrottleCounter

Indicates the type of throttle count to check for in a GetThrottleCount request.

BackgroundWorkCostValue BackgroundWorkCostValue BackgroundWorkCostValue BackgroundWorkCostValue BackgroundWorkCostValue

Indicates the current cost of doing background work. Used as a hint to background tasks about how much work they can do.

CustomSystemEventTriggerRecurrence CustomSystemEventTriggerRecurrence CustomSystemEventTriggerRecurrence CustomSystemEventTriggerRecurrence CustomSystemEventTriggerRecurrence

Specifies when a CustomSystemEventTrigger may be activated.

DeviceTriggerResult DeviceTriggerResult DeviceTriggerResult DeviceTriggerResult DeviceTriggerResult

Indicates whether the device background task operation was allowed or denied, and if it was denied specifies the reason.

LocationTriggerType LocationTriggerType LocationTriggerType LocationTriggerType LocationTriggerType

Indicates a type of location event for a location background task trigger.

MediaProcessingTriggerResult MediaProcessingTriggerResult MediaProcessingTriggerResult MediaProcessingTriggerResult MediaProcessingTriggerResult

Specifies the result of a call to MediaProcessingTrigger::RequestAsync.

SystemConditionType SystemConditionType SystemConditionType SystemConditionType SystemConditionType

Specifies a system condition that must be in effect for a background task to run. If a background task with a system condition is triggered, the task will not run until the condition is met.

SystemTriggerType SystemTriggerType SystemTriggerType SystemTriggerType SystemTriggerType

Specifies the system events that can be used to trigger a background task.


BackgroundTaskCanceledEventHandler BackgroundTaskCanceledEventHandler BackgroundTaskCanceledEventHandler BackgroundTaskCanceledEventHandler BackgroundTaskCanceledEventHandler

Represents a method that handles the cancellation of a background task.

BackgroundTaskCompletedEventHandler BackgroundTaskCompletedEventHandler BackgroundTaskCompletedEventHandler BackgroundTaskCompletedEventHandler BackgroundTaskCompletedEventHandler

Represents a method that handles completion events for a background task.

BackgroundTaskProgressEventHandler BackgroundTaskProgressEventHandler BackgroundTaskProgressEventHandler BackgroundTaskProgressEventHandler BackgroundTaskProgressEventHandler

Represents a method that handles progress update events for a background task.

See Also