ApplicationTrigger ApplicationTrigger ApplicationTrigger ApplicationTrigger Class

Definition

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

public : sealed class ApplicationTrigger : IApplicationTrigger, IBackgroundTriggerpublic sealed class ApplicationTrigger : IApplicationTrigger, IBackgroundTriggerPublic NotInheritable Class ApplicationTrigger Implements IApplicationTrigger, IBackgroundTrigger// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Important

An app can only register one ApplicationTrigger with the BackgroundTaskBuilder at any given time.

Constructors

ApplicationTrigger() ApplicationTrigger() ApplicationTrigger() ApplicationTrigger()

Creates a new ApplicationTrigger class

public : ApplicationTrigger()public ApplicationTrigger()Public Sub New()// You can use this method in JavaScript.

Methods

RequestAsync() RequestAsync() RequestAsync() RequestAsync()

This method attempts to set the trigger and start the registered background task.

public : IAsyncOperation<ApplicationTriggerResult> RequestAsync()public IAsyncOperation<ApplicationTriggerResult> RequestAsync()Public Function RequestAsync() As IAsyncOperation( Of ApplicationTriggerResult )// You can use this method in JavaScript.
Returns

Returns an ApplicationTriggerResult enumeration that indicates whether the user provided the necessary consent for the operation or the system policies didn't reject the request to trigger a background task.

See Also

RequestAsync(ValueSet) RequestAsync(ValueSet) RequestAsync(ValueSet) RequestAsync(ValueSet)

This method attempts to set the trigger and start the registered background task with specified arguments.

public : IAsyncOperation<ApplicationTriggerResult> RequestAsync(ValueSet arguments)public IAsyncOperation<ApplicationTriggerResult> RequestAsync(ValueSet arguments)Public Function RequestAsync(arguments As ValueSet) As IAsyncOperation( Of ApplicationTriggerResult )// You can use this method in JavaScript.
Parameters
arguments
ValueSet ValueSet ValueSet ValueSet

The serialized arguments that are passed to the background task.

Returns

Returns an ApplicationTriggerResult enumeration that indicates whether the user provided the necessary consent for the operation or the system policies didn't reject the request to trigger a background task.

See Also