BluetoothHeadset.StartVoiceRecognition(BluetoothDevice) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
启动蓝牙语音识别。
[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听 。 如果此函数返回 true,则此意向将广播 #EXTRA_STATE 并设置为 #STATE_AUDIO_CONNECTING。
#EXTRA_STATE在建立音频连接时,如果无法建立音频连接,则会从#STATE_AUDIO_CONNECTING#STATE_AUDIO_CONNECTED音频连接过渡到#STATE_AUDIO_DISCONNECTED该连接。
Java文档android.bluetooth.BluetoothHeadset.startVoiceRecognition(android.bluetooth.BluetoothDevice)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。