VoiceCommandResponse Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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:
|
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, IIterable<VoiceCommandContentTile>) |
Creates a VoiceCommandResponse object used in calls to ReportProgressAsync, ReportSuccessAsync or ReportFailureAsync. |
CreateResponse(VoiceCommandUserMessage) |
Creates a VoiceCommandResponse object used in calls to ReportProgressAsync, ReportSuccessAsync or ReportFailureAsync. |
CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage, IIterable<VoiceCommandContentTile>) |
Creates a VoiceCommandResponse object used in calls to RequestConfirmationAsync or RequestDisambiguationAsync. |
CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage) |
Creates a VoiceCommandResponse object used in calls to RequestConfirmationAsync or RequestDisambiguationAsync. |