BackgroundAccessStatus enumeration

This topic has not yet been rated - Rate this topic

Specifies an app's ability to perform background activity and display a tile on the lock screen.

A call to Windows.ApplicationModel.Background.BackgroundExecutionManager.requestAccessAsync presents a dialog box through which the user must explicitly select "allow" or "don't allow" for the app's access to the lock screen. These values represent the outcome of that selection, which combines both the answer given by the user and the current set of apps selected for that user's lock screen.

Syntax


var value = Windows.ApplicationModel.Background.BackgroundAccessStatus.unspecified;

Attributes

VersionAttribute(NTDDI_WIN8)

Members

The BackgroundAccessStatus enumeration has these members.

MemberValueDescription
Unspecified | unspecified0

The user has not selected "allow" or "don't allow" in the dialog box, or dismissed it without making a choice.

The app cannot perform background activity in this state. However, it can request permission from the user to do so through the RequestAccessAsync method.

AllowedWithAlwaysOnRealTimeConnectivity | allowedWithAlwaysOnRealTimeConnectivity1

The user chose "allow" in the dialog box. The app is added to the lock screen, can set up background tasks, and, if it has the capability, can use the real-time connectivity (RTC) broker. This means that the app can function while the device is in the connected standby state.

After this value has been returned, subsequent calls to the RequestAccessAsync method do not present the dialog box to the user.

AllowedMayUseActiveRealTimeConnectivity | allowedMayUseActiveRealTimeConnectivity2

The user chose "allow" in the dialog box. The app is added to the lock screen and can set up background tasks, but it cannot use the real-time connectivity (RTC) broker. This means that the app might not function while the device is in connected standby.

Note that apps that do not specify RTC in their manifest will always demonstrate this behavior.

After this value has been returned, subsequent calls to the RequestAccessAsync method do not present the dialog box to the user.

Denied | denied3

The user chose "don't allow" in the dialog box. The app is not added to the lock screen.

After this value has been returned, subsequent calls to the RequestAccessAsync method do not present the dialog box to the user.

Remarks

The settings that allow an app to use background activity and update its badge on the lock screen are found in the Settings charm or the Personalization page in PC Settings.

Declare the RTC capability in your app's manifest by specifying the Control channel background task in the Declarations tab. For more information, see How to set background connectivity options.

If all hardware RTC slots are full at the time that the app is added to the lock screen, and if the app has specified Control channel in its manifest, together with Timer or Push notification, it is added to the lock screen, but without RTC capability. The app can then make further requests to be added to the lock screen, which do not present UI to the user. If a hardware slot is open when one such request is made, the app will take that slot.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

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

Metadata

Windows.winmd

See also

How to set background connectivity options
BackgroundExecutionManager.getAccessStatus
BackgroundExecutionManager.requestAccessAsync
Lock screen apps sample

 

 

Build date: 12/4/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.