Class BluetoothAudio
Definition
- Assembly:
- Tizen.Network.Bluetooth.dll
This class is used to handle the connection with other Bluetooth audio devices like headset, hands-free, and headphone.
public class BluetoothAudio : BluetoothProfile
- Inheritance
Methods
View SourceConnect(BluetoothAudioProfileType)
Connects the remote device with the given audio profile.
Declaration
public void Connect(BluetoothAudioProfileType profileType)
Parameters
Type | Name | Description |
---|---|---|
BluetoothAudioProfileType | profileType | The type of the audio profile. |
Remarks
The device must be bonded with the remote device by CreateBond(). If connection request succeeds, the AudioConnectionStateChanged event will be invoked.
If audio profile type is All and this request succeeds, then the AudioConnectionStateChanged event will be called twice when HspHfp
and AdvancedAudioDistribution is connected.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Bluetooth is not supported. |
System.InvalidOperationException | Thrown when the Bluetooth is not enabled or when the connection attempt fails. |
Disconnect(BluetoothAudioProfileType)
Disconnects the remote device with the given audio profile.
Declaration
public void Disconnect(BluetoothAudioProfileType type)
Parameters
Type | Name | Description |
---|---|---|
BluetoothAudioProfileType | type | The type of the audio profile. |
Remarks
The device must be connected by Connect(). If the disconnection request succeeds, the AudioConnectionStateChanged event will be invoked.
If audio profile type is All and this request succeeds, then the AudioConnectionStateChanged event will be called twice when HspHfp
and AdvancedAudioDistribution is disconnected.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Bluetooth is not supported. |
System.InvalidOperationException | Thrown when the Bluetooth is not enabled or when Disconnection attempt fails. |
Events
View SourceAudioConnectionStateChanged
The AudioConnectionStateChanged event is called when the audio connection state is changed.
Declaration
public event EventHandler<AudioConnectionStateChangedEventArgs> AudioConnectionStateChanged
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><AudioConnectionStateChangedEventArgs> |