Class BluetoothAvrcpControl

Definition

Namespace:
Tizen.Network.Bluetooth
Assembly:
Tizen.Network.Bluetooth.dll

This class is used to send commands from the control device (For example, headset) to the target device (For example, media player).

C#
Copy
public class BluetoothAvrcpControl : BluetoothProfile
Inheritance
object
BluetoothAvrcpControl
Remarks

This class can be obtained from BluetoothDevice.GetProfile method.

Properties

View Source

EqualizerState

A property for the equalizer mode of target device.

Declaration
C#
Copy
public EqualizerState EqualizerState { get; set; }
Property Value
Type Description
EqualizerState
Remarks

The remote device must be connected.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

System.InvalidOperationException

Thrown when the Bluetooth is not enabled or when notifying the equalizer state to the remote device fails.

View Source

RepeatMode

A property for the repeat mode of target device.

Declaration
C#
Copy
public RepeatMode RepeatMode { get; set; }
Property Value
Type Description
RepeatMode
Remarks

The remote device must be connected.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

System.InvalidOperationException

Thrown when the Bluetooth is not enabled or when notifying the repeat mode state to the remote device fails.

View Source

ScanMode

A property for the scan mode of target device.

Declaration
C#
Copy
public ScanMode ScanMode { get; set; }
Property Value
Type Description
ScanMode
Remarks

The remote device must be connected.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

System.InvalidOperationException

Thrown when the Bluetooth is not enabled or if retrieving scan mode of the remote device fails.

View Source

ShuffleMode

A property for the suffle mode of target device.

Declaration
C#
Copy
public ShuffleMode ShuffleMode { get; set; }
Property Value
Type Description
ShuffleMode
Remarks

The remote device must be connected.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

System.InvalidOperationException

Thrown when the Bluetooth is not enabled or if retrieving shuffle mode of the remote device fails.

Methods

View Source

ConnectAsync()

Asynchronously connects the remote device

Declaration
C#
Copy
public Task ConnectAsync()
Returns
Type Description
System.Threading.Tasks.Task
Remarks

This class can be obtained from BluetoothDevice.GetProfile method.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

System.InvalidOperationException

Thrown when the method fails

View Source

DisconnectAsync()

Asynchronously disconnects the remote device

Declaration
C#
Copy
public Task DisconnectAsync()
Returns
Type Description
System.Threading.Tasks.Task
Remarks

This class can be obtained from BluetoothDevice.GetProfile method.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

System.InvalidOperationException

Thrown when the method fails

View Source

Dispose()

Declaration
C#
Copy
public void Dispose()
Remarks

This class can be obtained from BluetoothDevice.GetProfile method.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

View Source

~BluetoothAvrcpControl()

Finalizes an instance of the BluetoothAvrcpControl class.

Declaration
C#
Copy
protected ~BluetoothAvrcpControl()
Remarks

This class can be obtained from BluetoothDevice.GetProfile method.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

View Source

GetPlayStatus()

Gets player state of the target device.

Declaration
C#
Copy
public PlayerState GetPlayStatus()
Returns
Type Description
PlayerState

Play status of the target device

Remarks

The remote device must be connected.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

System.InvalidOperationException

Thrown when the Bluetooth is not enabled or if there happens to be an error while retrieving the player state of the target device.

View Source

GetPosition()

Gets position of the track being played on the target device.

Declaration
C#
Copy
public uint GetPosition()
Returns
Type Description
uint

Play position of the track being played on the target device

Remarks

The remote device must be connected.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

System.InvalidOperationException

Thrown when the Bluetooth is not enabled or if there is an error retrieving the position of the track that is currently being played.

View Source

GetTrackInfo()

Gets info of the track being played on the target device.

Declaration
C#
Copy
public Track GetTrackInfo()
Returns
Type Description
Track

Info of the track being played on the target device

Remarks

The remote device must be connected.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

System.InvalidOperationException

Thrown when the Bluetooth is not enabled or if there happens to be an error while retrieving info of the track being played on the target.

View Source

SendPlayerCommand(PlayerCommand)

Sends a particular play command to the target device

Declaration
C#
Copy
public void SendPlayerCommand(PlayerCommand command)
Parameters
Type Name Description
PlayerCommand command

Command to be sent

Remarks

The remote device must be connected.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

System.InvalidOperationException

Thrown when the Bluetooth is not enabled or when sending command to the target device fails.

Events

View Source

ConnectionStateChanged

The AvrcpControlConnectionChangedEventArgs event is invoked when the connection status of device is changed.

Declaration
C#
Copy
public event EventHandler<AvrcpControlConnectionChangedEventArgs> ConnectionStateChanged
Event Type
Type Description
System.EventHandler<TEventArgs><AvrcpControlConnectionChangedEventArgs>
Remarks

This class can be obtained from BluetoothDevice.GetProfile method.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

View Source

PlayStateChanged

The PlayStateChangedEventArgs event is invoked when the play state of a track gets changed.

Declaration
C#
Copy
public event EventHandler<PlayStateChangedEventArgs> PlayStateChanged
Event Type
Type Description
System.EventHandler<TEventArgs><PlayStateChangedEventArgs>
Remarks

This class can be obtained from BluetoothDevice.GetProfile method.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

View Source

PositionChanged

The PositionChangedEventArgs event is invoked when the play position of a track is changed.

Declaration
C#
Copy
public event EventHandler<PositionChangedEventArgs> PositionChanged
Event Type
Type Description
System.EventHandler<TEventArgs><PositionChangedEventArgs>
Remarks

This class can be obtained from BluetoothDevice.GetProfile method.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.

View Source

TrackInfoChanged

The TrackInfoChangedEventArgs event is invoked when info of a track gets changed.

Declaration
C#
Copy
public event EventHandler<TrackInfoChangedEventArgs> TrackInfoChanged
Event Type
Type Description
System.EventHandler<TEventArgs><TrackInfoChangedEventArgs>
Remarks

This class can be obtained from BluetoothDevice.GetProfile method.

Exceptions
Type Condition
System.NotSupportedException

The required feature is not supported.