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
Properties
View SourceIsAgScoOpened
A property to check whether an opened AG(Audio Gateway) SCO(Synchronous Connection Oriented link) exists or not.
Declaration
public static bool IsAgScoOpened { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
View SourceCloseAgSco()
Closes a AG(Audio Gateway) SCO(Synchronous Connection Oriented link) to the connected remote device asynchronously.
Declaration
public static void CloseAgSco()
Connect(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.
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.
NotifyAgVoiceRecognitionState(bool)
Notifies the state of AG(Audio Gateway) voice recognition to the connected remote device.
Declaration
public static void NotifyAgVoiceRecognitionState(bool enable)
Parameters
Type | Name | Description |
---|---|---|
bool | enable | The state of voice recognition. It is true if voice recognition state is enabled. |
OpenAgSco()
Opens a AG(Audio Gateway) SCO(Synchronous Connection Oriented link) to the connected remote device asynchronously.
Declaration
public static void OpenAgSco()
Events
View SourceAgScoStateChanged
This event is called when the AG(Audio Gateway) SCO(Synchronous Connection Oriented link) state is changed.
Declaration
public static event EventHandler<AgScoStateChangedEventArgs> AgScoStateChanged
Event Type
Type | Description |
---|---|
EventHandler<><AgScoStateChangedEventArgs> |
AudioConnectionStateChanged
The AudioConnectionStateChanged event is called when the audio connection state is changed.
Declaration
public event EventHandler<AudioConnectionStateChangedEventArgs> AudioConnectionStateChanged
Event Type
Type | Description |
---|---|
EventHandler<><AudioConnectionStateChangedEventArgs> |