VoiceCommandServiceConnection.RequestAppLaunchAsync 方法

定義

將回應傳送至 Cortana ,指出應用程式應該在前景處理命令。

public:
 virtual IAsyncAction ^ RequestAppLaunchAsync(VoiceCommandResponse ^ response) = RequestAppLaunchAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction RequestAppLaunchAsync(VoiceCommandResponse const& response);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction RequestAppLaunchAsync(VoiceCommandResponse response);
function requestAppLaunchAsync(response)
Public Function RequestAppLaunchAsync (response As VoiceCommandResponse) As IAsyncAction

參數

response
VoiceCommandResponse

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

傳回

作業完成時會呼叫非同步處理常式。

屬性

備註

若要啟用應用程式的深層連結,請在 windows.personalAssistantLaunch 應用程式專案的 Package.appxmanifest 檔案中宣告延伸模組。

應用程式會透過統一資源識別項 (URI) 使用 通訊協定 合約啟動至前景。 應用程式必須覆寫OnActivated事件,並檢查ProtocolActivationKind。 如需詳細資訊,請參閱 處理 URI 啟用

Cortana 會終止背景應用程式服務,並使用應用程式提供的 launch 參數在前景啟動應用程式。

適用於

另請參閱