共用方式為


VoiceCommandResponse 類別

定義

來自背景 App Service 的回應,用於進度、確認、厘清、完成或失敗畫面顯示在 Cortana 畫布上。

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
繼承
Object Platform::Object IInspectable VoiceCommandResponse
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

背景應用程式服務無法使用 VoiceCommandResponse 物件在 Cortana 畫布上顯示任何專案,除非應用程式可以存取 VoiceCommandServiceConnection 物件。 只有在從Cortana叫用背景應用程式服務時,才會建立VoiceCommandServiceConnection物件。

屬性

AppLaunchArgument

取得或設定字串做為啟動參數,可與背景應用程式服務回應相關聯。

AppLaunchArgument 是用來在 Cortana中透過深層連結啟動時指定前景應用程式的狀態或內容。

MaxSupportedVoiceCommandContentTiles

取得背景 App Service 可以在 Cortana 畫布上顯示的內容磚數目上限。

Message

Cortana所說出的初始訊息,並顯示在Cortana畫布上。

此訊息應該是:

RepeatMessage

如果無法理解回應,次要訊息 (用於厘清和確認畫面,只會) Cortana 所說出,並在 Cortana 畫布上顯示。

此訊息應該是第一個訊息的變化,以及下列其中一項:

VoiceCommandContentTiles

資產集合,包含影像和文字資料,由背景應用程式服務提供,以在 Cortana 畫布上顯示。

方法

CreateResponse(VoiceCommandUserMessage)

建立用於呼叫ReportProgressAsyncReportSuccessAsyncReportFailureAsyncVoiceCommandResponse物件。

CreateResponse(VoiceCommandUserMessage, IIterable<VoiceCommandContentTile>)

建立用於呼叫ReportProgressAsyncReportSuccessAsyncReportFailureAsyncVoiceCommandResponse物件。

CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage)

建立用於呼叫 RequestConfirmationAsyncRequestDisambiguationAsyncVoiceCommandResponse物件。

CreateResponseForPrompt(VoiceCommandUserMessage, VoiceCommandUserMessage, IIterable<VoiceCommandContentTile>)

建立用於呼叫 RequestConfirmationAsyncRequestDisambiguationAsyncVoiceCommandResponse物件。

適用於

另請參閱