Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IAudioSinkPlayerController

interface IAudioSinkPlayerController
Extends com.amazon.apmf.IStandard The Audio Player controller takes care of all the AVRCP functionalities in this layer. There is only one Audio player controller associated with an Audio Sink. If there are multiple user interfaces for a audio play control, a centralized entity in the OS takes care of arbitrating the requests from multiple user interfaces.

Methods

play()

void play()
Sends the ‘play’ command to the connected remote device. The device must be connected to be able to process this command. This is a blocking call and throws an exception if the command is not successfully sent to the target device. However, the successful processing of this command at the target device and an acknowledgement is not guaranteed by this interface. Privilege: com.amazon.bluetooth.privilege.audio_sink

Throws


stop()

void stop()
Sends the ‘stop’ command to the connected remote device. The device must be connected to be able to process this command. This is a blocking call and throws exception if the command is not successfully sent to the target device. However, the successful processing of this command at the target device and an acknowledgement is not guaranteed by this interface. Privilege: com.amazon.bluetooth.privilege.audio_sink

Throws


pause()

void pause()
Sends the ‘pause’ command to the connected remote device. The device must be connected to be able to process this command. This is a blocking call and throws an exception if the command is not successfully sent to the target device. However, the successful processing of this command at the target device and an acknowledgement is not guaranteed by this interface. Privilege: com.amazon.bluetooth.privilege.audio_sink

Throws


reverseSeek()

void reverseSeek()
Sends the ‘rewind’ command to the connected remote device. It seeks the current playing track to a backward position, and then plays at the normal pace. The length at which it seeks is determined by the application setting at the target (for example, phone). The device must be connected to process this command. Privilege: com.amazon.bluetooth.privilege.audio_sink

Throws


forwardSeek()

void forwardSeek()
Sends the fast_forward command to the connected remote device. This command seeks the current playing track position to a forward position and then plays at the normal pace. The length at which it seeks is determined by the application setting at the target (for example, phone). The device must be connected to be able to process this command.

Throws


nextTrack()

void nextTrack()
Sends the ‘forward’ command to the connected remote device. After the command is accepted by the target device, the next track starts playing. The device must be connected to be able to process this command. This is a blocking call and throws an exception if the command is not successfully sent to the target device. However, the successful processing of this command at the target device and an acknowledgement is not guaranteed by this interface. Privilege: com.amazon.bluetooth.privilege.audio_sink

Throws


previousTrack()

void previousTrack()
Sends the ‘backward’ command to the connected remote device. Once the command is accepted by the target device, the previous track starts playing. The device must be connected to be able to process this command. This is a blocking call and throws an exception if the command is not successfully sent to the target device. However, the successful processing of this command at the target device and an acknowledgement is not guaranteed by this interface. Privilege: com.amazon.bluetooth.privilege.audio_sink

Throws


getCurrentPlayingTrack()

IAudioSinkTrack* getCurrentPlayingTrack()
Retrieves the metadata of the currently playing track. This information is retrieved from the data cached in the Bluetooth service. This is a synchronous call across IPC to the Bluetooth service. Privilege: com.amazon.bluetooth.privilege.audio_sink

Returns

IAudioSinkTrack* Returns pointer to IAudioSinkTrack.

Throws


getTrackCount()

i32 getTrackCount()
Retrieves the number of tracks in the player metadata. Privilege: com.amazon.bluetooth.privilege.audio_sink

Returns

i32 If successful, the API returns the number of tracks in the metadata, otherwise returns -1.

Throws

  • BluetoothNotFound — if it is not able to retrieve the number or tracks for any reason.

getPlayState()

PlayerPlayState getPlayState()
Returns the state of the audio player as per PlayerPlayState. This information is retrieved from the data cached in the Bluetooth service. This is a synchronous call across IPC to the Bluetooth service. Privilege: com.amazon.bluetooth.privilege.audio_sink

Returns

PlayerPlayState Returns PlayerPlayState.

Throws


getSettings()

IAudioSinkPlayerSettings* getSettings()
Returns the interface to manipulate the settings of the Audio Sink Player. Privilege: com.amazon.bluetooth.privilege.audio_sink

Returns

IAudioSinkPlayerSettings* Returns pointer to IAudioSinkPlayerSettings.

addListener()

com.amazon.apmf.ISubscription* addListener(IAudioSinkPlayerListener* listener)
Registers listener to receive all the audio player event notifications. This interface needs to be called by the client to receive any AVRCP events. Privilege: com.amazon.bluetooth.privilege.audio_sink

Parameters

listener
IAudioSinkPlayerListener* — Required The listener instance pointer that must be registered to receive the AVRCP notifications.

Returns

com.amazon.apmf.ISubscription* Returns pointer to ISubscription.
Last modified on October 29, 2026