語言

RecognitionService.OnCheckRecognitionSupport 方法

定義

多載

OnCheckRecognitionSupport(Intent, RecognitionService+SupportCallback)

查詢該服務是否支援對相同的recognizerIntent呼叫OnStartListening(Intent, RecognitionService+Callback)。

[Android.Runtime.Register("onCheckRecognitionSupport", "(Landroid/content/Intent;Landroid/speech/RecognitionService$SupportCallback;)V", "GetOnCheckRecognitionSupport_Landroid_content_Intent_Landroid_speech_RecognitionService_SupportCallback_Handler", ApiSince=33)]
public virtual void OnCheckRecognitionSupport(Android.Content.Intent recognizerIntent, Android.Speech.RecognitionService.SupportCallback supportCallback);
[<Android.Runtime.Register("onCheckRecognitionSupport", "(Landroid/content/Intent;Landroid/speech/RecognitionService$SupportCallback;)V", "GetOnCheckRecognitionSupport_Landroid_content_Intent_Landroid_speech_RecognitionService_SupportCallback_Handler", ApiSince=33)>]
abstract member OnCheckRecognitionSupport : Android.Content.Intent * Android.Speech.RecognitionService.SupportCallback -> unit
override this.OnCheckRecognitionSupport : Android.Content.Intent * Android.Speech.RecognitionService.SupportCallback -> unit

參數

recognizerIntent
Intent

包含需要檢查支持的識別請求的意圖。

supportCallback
RecognitionService.SupportCallback

回撥過去用來回報辨識支援或錯誤。

屬性

備註

查詢該服務是否支援對相同的recognizerIntent呼叫OnStartListening(Intent, RecognitionService+Callback)。

服務會透過 SupportCallback 通知來電者支援程度或錯誤。

若服務未提供支援檢查,將以 通知來電者。CannotCheckSupport

Android 參考資料。android.speech.RecognitionService.onCheckRecognitionSupport

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於

OnCheckRecognitionSupport(Intent, AttributionSource, RecognitionService+SupportCallback)

檢查服務是否支援有意圖的起始識別。

[Android.Runtime.Register("onCheckRecognitionSupport", "(Landroid/content/Intent;Landroid/content/AttributionSource;Landroid/speech/RecognitionService$SupportCallback;)V", "GetOnCheckRecognitionSupport_Landroid_content_Intent_Landroid_content_AttributionSource_Landroid_speech_RecognitionService_SupportCallback_Handler", ApiSince=34)]
public virtual void OnCheckRecognitionSupport(Android.Content.Intent recognizerIntent, Android.Content.AttributionSource attributionSource, Android.Speech.RecognitionService.SupportCallback supportCallback);
[<Android.Runtime.Register("onCheckRecognitionSupport", "(Landroid/content/Intent;Landroid/content/AttributionSource;Landroid/speech/RecognitionService$SupportCallback;)V", "GetOnCheckRecognitionSupport_Landroid_content_Intent_Landroid_content_AttributionSource_Landroid_speech_RecognitionService_SupportCallback_Handler", ApiSince=34)>]
abstract member OnCheckRecognitionSupport : Android.Content.Intent * Android.Content.AttributionSource * Android.Speech.RecognitionService.SupportCallback -> unit
override this.OnCheckRecognitionSupport : Android.Content.Intent * Android.Content.AttributionSource * Android.Speech.RecognitionService.SupportCallback -> unit

參數

recognizerIntent
Intent

描述識別請求的意圖,以進行評估。

attributionSource
AttributionSource

呼叫應用程式的歸因來源。

supportCallback
RecognitionService.SupportCallback

收到支援或錯誤的回撥結果。

屬性

備註

檢查服務是否能從 開始識別 recognizerIntent。

回報支援等級或錯誤。supportCallback

用於 attributionSource 將權限與頻寬使用歸屬於呼叫者。

預設情況下,此超載會委派給 OnCheckRecognitionSupport(Intent, SupportCallback),並回報 CannotCheckSupport。 當您不需要 attributionSource時,會覆寫兩參數的超載以處理來自兩個入口點的支援檢查;若要使用該來源,請覆寫此重載。 在 API 層級 33 上,系統只會呼叫雙參數的超載,因此支援 API 層級 33 的應用程式也必須覆寫該超載。

Java 文件 android.speech.RecognitionService.onCheckRecognitionSupport(android.content.Intent, android.content.AttributionSource, android.speech.RecognitionService.SupportCallback)。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於