VoiceCommandResponse Class

Definition

The response from a background app service for progress, confirmation, disambiguation, completion, or failure screens displayed on the Cortana canvas.

public ref class VoiceCommandResponse sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class VoiceCommandResponse final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class VoiceCommandResponse
Public NotInheritable Class VoiceCommandResponse
Inheritance
Object Platform::Object IInspectable VoiceCommandResponse
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

The background app service cannot use the VoiceCommandResponse object to display anything on the Cortana canvas unless the app has access to a VoiceCommandServiceConnection object. A VoiceCommandServiceConnection object is created only when the background app service is invoked from Cortana.

Properties

AppLaunchArgument

Gets or sets a string as a launch parameter that can be associated with the response by the background app service.

AppLaunchArgument is used to specify the state or context of the foreground app when launched through a deep link in Cortana.

MaxSupportedVoiceCommandContentTiles

Gets the maximum number of content tiles the background app service can display on the Cortana canvas.

Message

The initial message that is spoken by Cortana and shown on the Cortana canvas.

This message should be:

RepeatMessage

The secondary message (for disambiguation and confirmation screens only) that is spoken by Cortana and shown on the Cortana canvas, if a response was not understood.

This message should be both a variation of the first message and one of the following:

  • An unambiguous question that can be answered with either yes or no on confirmation screens (see RequestConfirmationAsync).
  • A request for the user to select from the list of choices presented on disambiguation screens (see RequestDisambiguationAsync).
VoiceCommandContentTiles

The collection of assets, containing image and text data, provided by the background app service for display on the Cortana canvas.

Methods

CreateResponse(VoiceCommandUserMessage)

Creates a VoiceCommandResponse object used in calls to ReportProgressAsync, ReportSuccessAsync or ReportFailureAsync.

CreateResponse(VoiceCommandUserMessage, IIterable<VoiceCommandContentTile>)

Creates a VoiceCommandResponse object used in calls to ReportProgressAsync, ReportSuccessAsync or ReportFailureAsync.

CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage)

Creates a VoiceCommandResponse object used in calls to RequestConfirmationAsync or RequestDisambiguationAsync.

CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage, IIterable<VoiceCommandContentTile>)

Creates a VoiceCommandResponse object used in calls to RequestConfirmationAsync or RequestDisambiguationAsync.

Applies to

See also