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 IHandsfreeClientConnection

interface IHandsfreeClientConnection
Extends com.amazon.apmf.IStandard

Methods

addListener()

com.amazon.apmf.ISubscription* addListener(IHandsfreeClientConnectionListener* listener)
Subscribe to hands-free client events. Must be called to receive events for the device associated with the corresponding IHandsfreeClientConnection. Privilege: com.amazon.bluetooth.privilege.handsfree_client

Parameters

listener
IHandsfreeClientConnectionListener* — Required Callback for receiving hands-free client events. See IHandsfreeClientConnectionListener.

Returns

com.amazon.apmf.ISubscription* Returns pointer to ISubscription.

connect()

void connect()
Connect to a device with the hands-free profile. This is a blocking call. This triggers an outgoing connection. This device is the hands-free client and the remote device is the audio gateway. The device that is connected is the same device that is passed into IHandsfreeClient::getOrMakeHandsfreeClientDevice() when creating this IHandsfreeClientConnection interface. If the device is already connected, this API returns without an exception. Privilege: com.amazon.bluetooth.privilege.handsfree_client.

Throws


disconnect()

void disconnect()
Disconnect a device from the hands-free client capability. This is a blocking call. Privilege: com.amazon.bluetooth.privilege.handsfree_client

Throws


isConnected()

bool isConnected()
Get profile connection state. Privilege: com.amazon.bluetooth.privilege.access

Returns

bool Returns true if connected, false otherwise.

connectAudio()

void connectAudio()
Connect audio to start receiving/sending call audio. This is a blocking call. If the device already has audio connected, this function returns without an exception. Privilege: com.amazon.bluetooth.privilege.handsfree_client

Throws


disconnectAudio()

void disconnectAudio()
Disconnect audio to stop receiving/sending call audio. This is a blocking call. Privilege: com.amazon.bluetooth.privilege.handsfree_client

Throws


isAudioConnected()

bool isAudioConnected()
Get audio connection state.

Returns

bool Returns true if audio connected, false otherwise.

Throws

Privilege: com.amazon.bluetooth.privilege.access

dialCall()

void dialCall(string number)
Dial a call to a number. Use empty string to redial. Any strings over 15 characters are truncated. After the call is successfully dialed, onCallStateChanged() callback is triggered with the updated call state and a new ICall object. Privilege: com.amazon.bluetooth.privilege.handsfree_client

Parameters

number
string — Required Number to call

Throws


endAllCalls()

void endAllCalls()
End all calls on device. After the call(s) are successfully ended, an onCallStateChanged() callback is triggered with the updated call state(s). Privilege: com.amazon.bluetooth.privilege.handsfree_client

Throws


getCalls()

ICall*[] getCalls()
Returns the list of calls (ICall) on-going on device. This is a synchronous API with no corresponding callback. Privilege: com.amazon.bluetooth.privilege.handsfree_client

Returns

ICall*[] Returns a list with of all calls on-going (can be empty if no calls on-going).

Throws


sendDtmf()

void sendDtmf(string code)
Send dual-tone multi frequency (DTMF) signaling code. After the call(s) are successfully sent, an onCommandComplete() callback is triggered. An on-going call must exist for the code to be sent successfully to the device. Privilege: com.amazon.bluetooth.privilege.handsfree_client

Parameters

code
string — Required NFC-normalized UTF-8 string containing a single character from the characters ‘0’-‘9’, ‘A’-‘D’, ’*’, ’#’.

Throws


getSubscriberInformation()

string getSubscriberInformation()
Retrieve the subscriber information (phone number) of the current connected phone. This call blocks until the subscriber information received from the device. Privilege: com.amazon.bluetooth.privilege.handsfree_client

Returns

string Returns a string containing the subscriber information.

Throws


isNetworkAvailable()

bool isNetworkAvailable()
Get network availability status. This is a blocking API. Privilege: com.amazon.bluetooth.privilege.access

Returns

bool Returns true if network is available, false otherwise.

Throws


isServiceRoam()

bool isServiceRoam()
Get roaming status indication. This is a blocking API. This indicates whether the device is connected to its home cellular network or if it is roaming (using another cellular network). Privilege: com.amazon.bluetooth.privilege.access

Returns

bool Returns true is service is roaming, false if service type is home.

Throws


getSignalStrength()

u32 getSignalStrength()
Get signal strength indication. This is a blocking API. Privilege: com.amazon.bluetooth.privilege.handsfree_client

Returns

u32 Returns current signal strength (0-5).

Throws


getBatteryLevel()

u32 getBatteryLevel()
Get battery level indication. This is a blocking API. Privilege: com.amazon.bluetooth.privilege.handsfree_client

Returns

u32 Returns current battery level (0-5).

Throws


getNetworkName()

string getNetworkName()
Get selected operator string. This is a blocking API. Privilege: com.amazon.bluetooth.privilege.handsfree_client

Returns

string Returns a string containing the current network operator name.

Throws


getDevice()

IDevice* getDevice()
Retrieves the device interface corresponding to the Bluetooth device with the hands-free client profile-level connection.

Returns

IDevice* Returns a pointer to IDevice.
Last modified on October 29, 2026