Share via


DeviceUseTrigger.RequestAsync Method

Definition

Overloads

RequestAsync(String)

Triggers the background task and returns a DeviceTriggerResult indicating success or failure of the trigger request. Takes the DeviceInformation.ID of the device or sensor that the background task will access.

RequestAsync(String, String)

Triggers the background task and returns a DeviceTriggerResult indicating success or failure of the trigger request. Takes the DeviceInformation.ID of the device or sensor that the background task will access, and an optional app-specific string passed to the background task identifying which operation to perform.

RequestAsync(String)

Triggers the background task and returns a DeviceTriggerResult indicating success or failure of the trigger request. Takes the DeviceInformation.ID of the device or sensor that the background task will access.

public:
 virtual IAsyncOperation<DeviceTriggerResult> ^ RequestAsync(Platform::String ^ deviceId) = RequestAsync;
/// [Windows.Foundation.Metadata.DefaultOverload]
/// [Windows.Foundation.Metadata.Overload("RequestAsyncSimple")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<DeviceTriggerResult> RequestAsync(winrt::hstring const& deviceId);
[Windows.Foundation.Metadata.DefaultOverload]
[Windows.Foundation.Metadata.Overload("RequestAsyncSimple")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<DeviceTriggerResult> RequestAsync(string deviceId);
function requestAsync(deviceId)
Public Function RequestAsync (deviceId As String) As IAsyncOperation(Of DeviceTriggerResult)

Parameters

deviceId
String

Platform::String

winrt::hstring

The DeviceInformation.ID of the device or sensor that the background task will access. It must match the device or sensor that will perform the background operation. It is used by Windows to ensure that policy requirements are met.

Returns

This method returns a DeviceTriggerResult when it completes asynchronously.

Attributes

See also

Applies to

RequestAsync(String, String)

Triggers the background task and returns a DeviceTriggerResult indicating success or failure of the trigger request. Takes the DeviceInformation.ID of the device or sensor that the background task will access, and an optional app-specific string passed to the background task identifying which operation to perform.

public:
 virtual IAsyncOperation<DeviceTriggerResult> ^ RequestAsync(Platform::String ^ deviceId, Platform::String ^ arguments) = RequestAsync;
/// [Windows.Foundation.Metadata.DefaultOverload]
/// [Windows.Foundation.Metadata.Overload("RequestAsyncWithArguments")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<DeviceTriggerResult> RequestAsync(winrt::hstring const& deviceId, winrt::hstring const& arguments);
[Windows.Foundation.Metadata.DefaultOverload]
[Windows.Foundation.Metadata.Overload("RequestAsyncWithArguments")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<DeviceTriggerResult> RequestAsync(string deviceId, string arguments);
function requestAsync(deviceId, arguments)
Public Function RequestAsync (deviceId As String, arguments As String) As IAsyncOperation(Of DeviceTriggerResult)

Parameters

deviceId
String

Platform::String

winrt::hstring

The DeviceInformation.ID of the device or sensor that the background task will access. It must match the device or sensor that will perform the background operation. It is used by Windows to ensure that policy requirements are met.

arguments
String

Platform::String

winrt::hstring

Optional value. A string specified by your app and passed to the background task, identifying which operation to perform.

Returns

This method returns a DeviceTriggerResult when it completes asynchronously.

Attributes

See also

Applies to