VoiceCommandResponse
VoiceCommandResponse
VoiceCommandResponse
VoiceCommandResponse
Class
Definition
The response from a background app service for progress, confirmation, disambiguation, completion, or failure screens displayed on the Cortana canvas.
public : sealed class VoiceCommandResponse : IVoiceCommandResponsepublic sealed class VoiceCommandResponse : IVoiceCommandResponsePublic NotInheritable Class VoiceCommandResponse Implements IVoiceCommandResponse// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
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 AppLaunchArgument AppLaunchArgument 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.
public : PlatForm::String AppLaunchArgument { get; set; }public string AppLaunchArgument { get; set; }Public ReadWrite Property AppLaunchArgument As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The string used as a launch parameter.
Remarks
To enable deep linking to an app, declare the windows.personalAssistantLaunch extension in the Package.appxmanifest file of the app project.
An app is launched to the foreground through Uniform Resource Identifier (URI) activation using a Protocol contract. The app must override the OnActivated event and check for an ActivationKind of Protocol. See Handle URI activation for more info.
- See Also
MaxSupportedVoiceCommandContentTiles MaxSupportedVoiceCommandContentTiles MaxSupportedVoiceCommandContentTiles MaxSupportedVoiceCommandContentTiles
Gets the maximum number of content tiles the background app service can display on the Cortana canvas.
public : static unsigned int MaxSupportedVoiceCommandContentTiles { get; }public static uint MaxSupportedVoiceCommandContentTiles { get; }Public Static ReadOnly Property MaxSupportedVoiceCommandContentTiles As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The maximum number of content tiles.
Remarks
The maximum number of tiles that can be displayed depends on the feedback screen being shown. One item when the VoiceCommandResponse is created for ReportProgressAsync or RequestConfirmationAsync, and more than one item when the VoiceCommandResponse is created for RequestDisambiguationAsync.
- See Also
Message Message Message Message
The initial message that is spoken by Cortana and shown on the Cortana canvas.
This message should be:
- An informative statement on progress, completion, and error screens (see ReportProgressAsync, ReportSuccessAsync, ReportFailureAsync ).
- 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 ).
public : VoiceCommandUserMessage Message { get; set; }public VoiceCommandUserMessage Message { get; set; }Public ReadWrite Property Message As VoiceCommandUserMessage// You can use this property in JavaScript.
- Value
- VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage
The message that is spoken or shown by Cortana.
- See Also
RepeatMessage RepeatMessage RepeatMessage 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 ).
public : VoiceCommandUserMessage RepeatMessage { get; set; }public VoiceCommandUserMessage RepeatMessage { get; set; }Public ReadWrite Property RepeatMessage As VoiceCommandUserMessage// You can use this property in JavaScript.
- Value
- VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage
The message that is spoken or shown by Cortana.
- See Also
VoiceCommandContentTiles VoiceCommandContentTiles VoiceCommandContentTiles VoiceCommandContentTiles
The collection of assets, containing image and text data, provided by the background app service for display on the Cortana canvas.
public : IVector<VoiceCommandContentTile> VoiceCommandContentTiles { get; }public IList<VoiceCommandContentTile> VoiceCommandContentTiles { get; }Public ReadOnly Property VoiceCommandContentTiles As IList<VoiceCommandContentTile>// You can use this property in JavaScript.
- Value
- IVector<VoiceCommandContentTile> IList<VoiceCommandContentTile> IList<VoiceCommandContentTile> IList<VoiceCommandContentTile>
The collection of assets.
- See Also
Methods
CreateResponse(VoiceCommandUserMessage) CreateResponse(VoiceCommandUserMessage) CreateResponse(VoiceCommandUserMessage) CreateResponse(VoiceCommandUserMessage)
Creates a VoiceCommandResponse object used in calls to ReportProgressAsync, ReportSuccessAsync or ReportFailureAsync.
public : static VoiceCommandResponse CreateResponse(VoiceCommandUserMessage userMessage)public static VoiceCommandResponse CreateResponse(VoiceCommandUserMessage userMessage)Public Static Function CreateResponse(userMessage As VoiceCommandUserMessage) As VoiceCommandResponse// You can use this method in JavaScript.
- userMessage
- VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage
The message that is spoken by Cortana and shown on the Cortana canvas. This message should be:
- An informative statement on progress, completion, and error screens (see ReportProgressAsync, ReportSuccessAsync, ReportFailureAsync ).
- 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 ).
The response from the background app service for progress, completion, confirmation, or disambiguation screens displayed on the Cortana canvas.
- See Also
-
CreateResponse(VoiceCommandUserMessage, IIterable<VoiceCommandContentTile>)CreateResponse(VoiceCommandUserMessage, IIterable<VoiceCommandContentTile>)CreateResponse(VoiceCommandUserMessage, IIterable<VoiceCommandContentTile>)CreateResponse(VoiceCommandUserMessage, IIterable<VoiceCommandContentTile>)
CreateResponse(VoiceCommandUserMessage, IIterable)
CreateResponse(VoiceCommandUserMessage, IIterable)
CreateResponse(VoiceCommandUserMessage, IIterable)
CreateResponse(VoiceCommandUserMessage, IIterable)
Creates a VoiceCommandResponse object used in calls to ReportProgressAsync, ReportSuccessAsync or ReportFailureAsync.
public : static VoiceCommandResponse CreateResponse(VoiceCommandUserMessage message, IIterable<VoiceCommandContentTile> contentTiles)public static VoiceCommandResponse CreateResponse(VoiceCommandUserMessage message, IEnumerable<VoiceCommandContentTile> contentTiles)Public Static Function CreateResponse(message As VoiceCommandUserMessage, contentTiles As IEnumerable<VoiceCommandContentTile>) As VoiceCommandResponse// You can use this method in JavaScript.
- message
- VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage
The message that is spoken by Cortana and shown on the Cortana canvas. This message should be:
- An informative statement on progress, completion, and error screens (see ReportProgressAsync, ReportSuccessAsync, ReportFailureAsync ).
- 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 ).
- contentTiles
- IIterable<VoiceCommandContentTile> IEnumerable<VoiceCommandContentTile> IEnumerable<VoiceCommandContentTile> IEnumerable<VoiceCommandContentTile>
The collection of VoiceCommandContentTile objects, containing image and text data, shown as result cards on the Cortana canvas.
The response from the background app service for progress, completion, confirmation, or disambiguation screens displayed on the Cortana canvas.
- See Also
CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage) CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage) CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage) CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage)
Creates a VoiceCommandResponse object used in calls to RequestConfirmationAsync or RequestDisambiguationAsync.
public : static VoiceCommandResponse CreateResponseForPrompt(VoiceCommandUserMessage message, VoiceCommandUserMessage repeatMessage)public static VoiceCommandResponse CreateResponseForPrompt(VoiceCommandUserMessage message, VoiceCommandUserMessage repeatMessage)Public Static Function CreateResponseForPrompt(message As VoiceCommandUserMessage, repeatMessage As VoiceCommandUserMessage) As VoiceCommandResponse// You can use this method in JavaScript.
- message
- VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage
The initial message that is spoken by Cortana and shown on the Cortana canvas. This message should be 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 ).
- repeatMessage
- VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage
The secondary message 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 ).
The response from the background app service for progress, completion, confirmation, or disambiguation screens displayed on the Cortana canvas.
- See Also
-
CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage, IIterable<VoiceCommandContentTile>)CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage, IIterable<VoiceCommandContentTile>)CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage, IIterable<VoiceCommandContentTile>)CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage, IIterable<VoiceCommandContentTile>)
CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage, IIterable)
CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage, IIterable)
CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage, IIterable)
CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage, IIterable)
Creates a VoiceCommandResponse object used in calls to RequestConfirmationAsync or RequestDisambiguationAsync.
public : static VoiceCommandResponse CreateResponseForPrompt(VoiceCommandUserMessage message, VoiceCommandUserMessage repeatMessage, IIterable<VoiceCommandContentTile> contentTiles)public static VoiceCommandResponse CreateResponseForPrompt(VoiceCommandUserMessage message, VoiceCommandUserMessage repeatMessage, IEnumerable<VoiceCommandContentTile> contentTiles)Public Static Function CreateResponseForPrompt(message As VoiceCommandUserMessage, repeatMessage As VoiceCommandUserMessage, contentTiles As IEnumerable<VoiceCommandContentTile>) As VoiceCommandResponse// You can use this method in JavaScript.
- message
- VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage
The initial message that is spoken by Cortana and shown on the Cortana canvas. This message should be 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 ).
- repeatMessage
- VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage VoiceCommandUserMessage
The secondary message 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 ).
- contentTiles
- IIterable<VoiceCommandContentTile> IEnumerable<VoiceCommandContentTile> IEnumerable<VoiceCommandContentTile> IEnumerable<VoiceCommandContentTile>
The collection of assets, containing image and text data, shown on the Cortana canvas.
The response from the background app service for progress, completion, confirmation, or disambiguation screens displayed on the Cortana canvas.
- See Also