Class BluetoothAudio
Definition
- Namespace:
- Tizen.Network.Bluetooth
- Assembly:
- Tizen.Network.Bluetooth.dll
- API Level:
- 3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/bluetooth
This class is used to handle the connection with other Bluetooth audio devices like headset, hands-free, and headphone.
C#Copypublic class BluetoothAudio : BluetoothProfile
- Inheritance
Properties
IsAgScoOpened
A property to check whether an opened AG(Audio Gateway) SCO(Synchronous Connection Oriented link) exists or not.
Declaration
C#Copypublic static bool IsAgScoOpened { get; }
Property Value
Type | Description |
---|---|
Boolean |
API Level: 6
Feature: http://tizen.org/feature/network.bluetoothhttp://tizen.org/feature/network.bluetooth.audio.call
Methods
CloseAgSco()
Closes a AG(Audio Gateway) SCO(Synchronous Connection Oriented link) to the connected remote device asynchronously.
Declaration
C#Copypublic static void CloseAgSco()
API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth.admin
Feature: http://tizen.org/feature/network.bluetoothhttp://tizen.org/feature/network.bluetooth.audio.call
Connect(BluetoothAudioProfileType)
Connects the remote device with the given audio profile.
Declaration
C#Copypublic 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.
API Level: 3
Disconnect(BluetoothAudioProfileType)
Disconnects the remote device with the given audio profile.
Declaration
C#Copypublic 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.
API Level: 3
NotifyAgVoiceRecognitionState(Boolean)
Notifies the state of AG(Audio Gateway) voice recognition to the connected remote device.
Declaration
C#Copypublic static void NotifyAgVoiceRecognitionState(bool enable)
Parameters
Type | Name | Description |
---|---|---|
Boolean | enable | The state of voice recognition. It is true if voice recognition state is enabled. |
API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth.admin
Feature: http://tizen.org/feature/network.bluetoothhttp://tizen.org/feature/network.bluetooth.audio.call
OpenAgSco()
Opens a AG(Audio Gateway) SCO(Synchronous Connection Oriented link) to the connected remote device asynchronously.
Declaration
C#Copypublic static void OpenAgSco()
API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth.admin
Feature: http://tizen.org/feature/network.bluetoothhttp://tizen.org/feature/network.bluetooth.audio.call
Events
AgScoStateChanged
This event is called when the AG(Audio Gateway) SCO(Synchronous Connection Oriented link) state is changed.
Declaration
C#Copypublic static event EventHandler<AgScoStateChangedEventArgs> AgScoStateChanged
Event Type
Type | Description |
---|---|
EventHandler<AgScoStateChangedEventArgs> |
API Level: 6
Feature: http://tizen.org/feature/network.bluetoothhttp://tizen.org/feature/network.bluetooth.audio.call
AudioConnectionStateChanged
The AudioConnectionStateChanged event is called when the audio connection state is changed.
Declaration
C#Copypublic event EventHandler<AudioConnectionStateChangedEventArgs> AudioConnectionStateChanged
Event Type
Type | Description |
---|---|
EventHandler<AudioConnectionStateChangedEventArgs> |