Overload list
| Method | Description |
|---|---|
| RequestAccessAsync() | Presents the user with a dialog box that requests that the calling app be added to the lock screen. |
| RequestAccessAsync(String) | Presents the user with a dialog box that requests that the specified app be added to the lock screen. |
Examples
This example shows this method used to add an app to the lock screen.
var Background = Windows.ApplicationModel.Background; var promise = Background.BackgroundExecutionManager.requestAccessAsync().then( function(result) { switch (result) { case Background.BackgroundAccessStatus.denied: // Background activity and updates for this app are disabled by the user. break; case Background.BackgroundAccessStatus.allowedWithAlwaysOnRealTimeConnectivity: // Added to list of background apps. // Set up background tasks; can use the network connectivity broker. break; case Background.BackgroundAccessStatus.allowedMayUseActiveRealTimeConnectivity: // Added to list of background apps. // Set up background tasks; cannot use the network connectivity broker. break; case Background.BackgroundAccessStatus.unspecified: // The user didn't explicitly disable or enable access and updates. break; } });
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 12/4/2012