Share via


BluetoothHeadset.StartVoiceRecognition(BluetoothDevice) Method

Definition

Start Bluetooth voice recognition.

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

Parameters

device
BluetoothDevice

Bluetooth headset

Returns

false if there is no headset connected, or the connected headset doesn't support voice recognition, or voice recognition is already started, or audio channel is occupied, or on error, true otherwise

Attributes

Remarks

Start Bluetooth voice recognition. This methods sends the voice recognition AT command to the headset and establishes the audio connection.

Users can listen to #ACTION_AUDIO_STATE_CHANGED. If this function returns true, this intent will be broadcasted with #EXTRA_STATE set to #STATE_AUDIO_CONNECTING.

#EXTRA_STATE will transition from #STATE_AUDIO_CONNECTING to #STATE_AUDIO_CONNECTED when audio connection is established and to #STATE_AUDIO_DISCONNECTED in case of failure to establish the audio connection.

Java documentation for android.bluetooth.BluetoothHeadset.startVoiceRecognition(android.bluetooth.BluetoothDevice).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to