語言

BluetoothHeadset.StartVoiceRecognition(BluetoothDevice) 方法

定義

啟動藍牙語音辨識。

[Android.Runtime.Register("startVoiceRecognition", "(Landroid/bluetooth/BluetoothDevice;)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool StartVoiceRecognition(Android.Bluetooth.BluetoothDevice? device);
[<Android.Runtime.Register("startVoiceRecognition", "(Landroid/bluetooth/BluetoothDevice;)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.StartVoiceRecognition : Android.Bluetooth.BluetoothDevice -> bool

參數

device
BluetoothDevice

藍牙耳機

傳回

如果沒有連接耳機,或連接的耳機不支援語音辨識,或語音辨識已啟動,或音訊頻道被佔用,則為 false;若錯誤,則為 true,否則為

屬性

備註

啟動藍牙語音辨識。 此方法會將語音辨識 AT 指令傳送至耳機,並建立音訊連線。

使用者可以收聽。#ACTION_AUDIO_STATE_CHANGED 若此函數返回為真,則此意圖將被廣播,並設定 #EXTRA_STATE 為 #STATE_AUDIO_CONNECTING。

#EXTRA_STATE當音訊連線建立時,將切換#STATE_AUDIO_CONNECTING#STATE_AUDIO_CONNECTED至 ,若音訊連線無法建立時,則切換至 。#STATE_AUDIO_DISCONNECTED

Java 文件 android.bluetooth.BluetoothHeadset.startVoiceRecognition(android.bluetooth.BluetoothDevice)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於