Class BluetoothAvrcpControl
Definition
- Namespace:
- Tizen.Network.Bluetooth
- Assembly:
- Tizen.Network.Bluetooth.dll
- API Level:
- 8
- Feature:
- http://tizen.org/feature/network.bluetooth.audio.controller
This class is used to send commands from the control device (For example, headset) to the target device (For example, media player).
public class BluetoothAvrcpControl : BluetoothProfile
- Inheritance
Remarks
This class can be obtained from BluetoothDevice.GetProfile method.
Properties
View SourceEqualizerState
A property for the equalizer mode of target device.
Declaration
public EqualizerState EqualizerState { get; set; }
Property Value
Type | Description |
---|---|
EqualizerState |
Remarks
The remote device must be connected.
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |
InvalidOperationException | Thrown when the Bluetooth is not enabled or when notifying the equalizer state to the remote device fails. |
API Level: 8
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth
Feature: http://tizen.org/feature/network.bluetooth.audio.controller
View SourceRepeatMode
A property for the repeat mode of target device.
Declaration
public RepeatMode RepeatMode { get; set; }
Property Value
Type | Description |
---|---|
RepeatMode |
Remarks
The remote device must be connected.
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |
InvalidOperationException | Thrown when the Bluetooth is not enabled or when notifying the repeat mode state to the remote device fails. |
API Level: 8
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth
Feature: http://tizen.org/feature/network.bluetooth.audio.controller
View SourceScanMode
A property for the scan mode of target device.
Declaration
public ScanMode ScanMode { get; set; }
Property Value
Type | Description |
---|---|
ScanMode |
Remarks
The remote device must be connected.
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |
InvalidOperationException | Thrown when the Bluetooth is not enabled or if retrieving scan mode of the remote device fails. |
API Level: 8
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth
Feature: http://tizen.org/feature/network.bluetooth.audio.controller
View SourceShuffleMode
A property for the suffle mode of target device.
Declaration
public ShuffleMode ShuffleMode { get; set; }
Property Value
Type | Description |
---|---|
ShuffleMode |
Remarks
The remote device must be connected.
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |
InvalidOperationException | Thrown when the Bluetooth is not enabled or if retrieving shuffle mode of the remote device fails. |
API Level: 8
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth
Feature: http://tizen.org/feature/network.bluetooth.audio.controller
Methods
View SourceConnectAsync()
Asynchronously connects the remote device
Declaration
public Task ConnectAsync()
Returns
Type | Description |
---|---|
Task |
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |
InvalidOperationException | Thrown when the method fails |
API Level: 8
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth
Feature: http://tizen.org/feature/network.bluetooth.audio.controller
View SourceDisconnectAsync()
Asynchronously disconnects the remote device
Declaration
public Task DisconnectAsync()
Returns
Type | Description |
---|---|
Task |
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |
InvalidOperationException | Thrown when the method fails |
API Level: 8
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth
Feature: http://tizen.org/feature/network.bluetooth.audio.controller
View SourceDispose()
Declaration
public void Dispose()
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |
Finalize()
Finalizes an instance of the BluetoothAvrcpControl class.
Declaration
protected void Finalize()
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |
GetPlayStatus()
Gets player state of the target device.
Declaration
public PlayerState GetPlayStatus()
Returns
Type | Description |
---|---|
PlayerState | Play status of the target device |
Remarks
The remote device must be connected.
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |
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. |
API Level: 8
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth
Feature: http://tizen.org/feature/network.bluetooth.audio.controller
View SourceGetPosition()
Gets position of the track being played on the target device.
Declaration
public uint GetPosition()
Returns
Type | Description |
---|---|
UInt32 | Play position of the track being played on the target device |
Remarks
The remote device must be connected.
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |
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. |
API Level: 8
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth
Feature: http://tizen.org/feature/network.bluetooth.audio.controller
View SourceGetTrackInfo()
Gets info of the track being played on the target device.
Declaration
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 |
---|---|
NotSupportedException | The required feature is not supported. |
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. |
API Level: 8
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth
Feature: http://tizen.org/feature/network.bluetooth.audio.controller
View SourceSendPlayerCommand(PlayerCommand)
Sends a particular play command to the target device
Declaration
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 |
---|---|
NotSupportedException | The required feature is not supported. |
InvalidOperationException | Thrown when the Bluetooth is not enabled or when sending command to the target device fails. |
API Level: 8
Privilege Level: public
Privilege: http://tizen.org/privilege/bluetooth
Feature: http://tizen.org/feature/network.bluetooth.audio.controller
Events
View SourceConnectionStateChanged
The AvrcpControlConnectionChangedEventArgs event is invoked when the connection status of device is changed.
Declaration
public event EventHandler<AvrcpControlConnectionChangedEventArgs> ConnectionStateChanged
Event Type
Type | Description |
---|---|
EventHandler<AvrcpControlConnectionChangedEventArgs> |
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |
API Level: 8
View SourcePlayStateChanged
The PlayStateChangedEventArgs event is invoked when the play state of a track gets changed.
Declaration
public event EventHandler<PlayStateChangedEventArgs> PlayStateChanged
Event Type
Type | Description |
---|---|
EventHandler<PlayStateChangedEventArgs> |
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |
API Level: 8
View SourcePositionChanged
The PositionChangedEventArgs event is invoked when the play position of a track is changed.
Declaration
public event EventHandler<PositionChangedEventArgs> PositionChanged
Event Type
Type | Description |
---|---|
EventHandler<PositionChangedEventArgs> |
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |
API Level: 8
View SourceTrackInfoChanged
The TrackInfoChangedEventArgs event is invoked when info of a track gets changed.
Declaration
public event EventHandler<TrackInfoChangedEventArgs> TrackInfoChanged
Event Type
Type | Description |
---|---|
EventHandler<TrackInfoChangedEventArgs> |
Exceptions
Type | Condition |
---|---|
NotSupportedException | The required feature is not supported. |