Class BluetoothAudio

    Definition

    Namespace:
    Tizen.Network.Bluetooth
    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
    object
    BluetoothProfile
    BluetoothAudio

    Methods

    View Source

    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.

    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.

    View Source

    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 Source

    AudioConnectionStateChanged

    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>
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX