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 IAudioSinkConnection

interface IAudioSinkConnection
Extends com.amazon.apmf.IStandard The interface to provide Audio connection functionalities.

Methods

connect()

void connect()
Connect audio to a device. This is a blocking call. The IDevice reference that is passed into this interface via the IAudioSink::getOrMakeAudioSinkConnection is the remote device to which this audio connection is established. If the device is already connected, this function returns without exception. Privilege: com.amazon.bluetooth.privilege.audio_sink

Throws


disconnect()

void disconnect()
Disconnect Audio capability from the device. This is a blocking call and the device to be disconnected is designated by the IDevice reference passed into this interface via the IAudioSink::getOrMakeAudioSinkConnection. Privilege: com.amazon.bluetooth.privilege.audio_sink

Throws


isConnected()

bool isConnected()
Checks if the audio capability is connected or not. Privilege: com.amazon.bluetooth.privilege.access

Returns

bool Returns true if connected, false otherwise.

isAudioConnected()

bool isAudioConnected()
Checks if the audio capability is connected or not. If the audio capability is connected, the audio packets are streamed over the A2DP profile. Privilege: com.amazon.bluetooth.privilege.access

Returns

bool Returns true if audio capability is connected, false otherwise.

getAudioSinkPlayerController()

IAudioSinkPlayerController* getAudioSinkPlayerController()
Get the AVRCP controller. Returns the AudioSinkPlayerController to be used to get all the AVRCP related attributes. This interface throws an exception if there is no audio connection existing for the device associated with this interface.

Returns

IAudioSinkPlayerController* Returns pointer to IAudioSinkPlayerController.

Throws


getDevice()

IDevice* getDevice()
Get the device associated with this connection interface. Retrieves the device interface corresponding to the Bluetooth device to which the Audio Sink connection is established/being established.

Returns

IDevice* Returns pointer to IDevice.

addListener()

com.amazon.apmf.ISubscription* addListener(IAudioSinkConnectionListener* listener)
Subscribe to audio connection events. This interface must be used to subscribe for any connection events from the Audio Sink stack. Privilege: com.amazon.bluetooth.privilege.access

Parameters

listener
IAudioSinkConnectionListener* — Required The listener interface to receive the Audio Sink connection notifications.

Returns

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