as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support

AudioManagerClientTurboModule

Extends

  • KeplerTurboModule

Properties

allocateCustomAudioEffectSessionAsync()

allocateCustomAudioEffectSessionAsync: () => Promise<number>

Creates a unique session ID for custom audio effects.

Returns

Promise<number>

A promise that resolves to:

  • Positive value: New unique session ID
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_NO_MEMORY (-1): Failed to allocate new session

areSystemSoundsEnabledAsync()

areSystemSoundsEnabledAsync: () => Promise<boolean>

Checks if system sounds are currently enabled.

Returns

Promise<boolean>

A promise that resolves to:

  • true: System sounds are enabled
  • false: System sounds are disabled

Throws error with:

  • STATUS_NO_INIT (-3): Audio system not initialized

disableAvrcpAbsoluteVolumeAsync()

disableAvrcpAbsoluteVolumeAsync: (btAddress) => Promise<AudioStatus>

Disables AVRCP absolute volume control for a Bluetooth device. Requires privilege: com.amazon.audio.privilege.settings.control

Parameters

btAddress

String

Bluetooth device address

Returns

Promise<AudioStatus>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Feature disabled successfully
  • STATUS_BAD_VALUE (-2): Invalid address
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_PERMISSION_DENIED (-9): Missing required privileges
  • STATUS_INVALID_OPERATION (-8): Device not connected

disableSystemSoundsAsync()

disableSystemSoundsAsync: () => Promise<AudioStatus>

Disables all system sounds.

Returns

Promise<AudioStatus>

A promise that resolves to:

  • STATUS_NO_ERROR (0): System sounds disabled successfully
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_INVALID_OPERATION (-8): Already disabled

disableUsageAsync()

disableUsageAsync: (usage) => Promise<AudioStatus>

Disables audio playback for a specific usage type. Currently only supports notification usage type. Requires privilege: com.amazon.audio.privilege.settings.control

Parameters

usage

number

The usage type to disable from types/AudioCoreClientTypes.AudioUsageType enum

Returns

Promise<AudioStatus>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Usage disabled successfully
  • STATUS_BAD_VALUE (-2): Invalid or unsupported usage type
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_PERMISSION_DENIED (-9): Missing required privileges

enableAvrcpAbsoluteVolumeAsync()

enableAvrcpAbsoluteVolumeAsync: (btAddress) => Promise<AudioStatus>

Enables AVRCP absolute volume control for a Bluetooth device. Requires privilege: com.amazon.audio.privilege.settings.control

Parameters

btAddress

String

Bluetooth device address

Returns

Promise<AudioStatus>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Feature enabled successfully
  • STATUS_BAD_VALUE (-2): Invalid address
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_PERMISSION_DENIED (-9): Missing required privileges
  • STATUS_INVALID_OPERATION (-8): Device not connected

enableSystemSoundsAsync()

enableSystemSoundsAsync: () => Promise<AudioStatus>

Enables all system sounds.

Returns

Promise<AudioStatus>

A promise that resolves to:

  • STATUS_NO_ERROR (0): System sounds enabled successfully
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_INVALID_OPERATION (-8): Already enabled

enableUsageAsync()

enableUsageAsync: (usage) => Promise<AudioStatus>

Enables audio playback for a specific usage type. Currently only supports notification usage type. Requires privilege: com.amazon.audio.privilege.settings.control

Parameters

usage

number

The usage type to enable from AudioUsageType enum

Returns

Promise<AudioStatus>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Usage enabled successfully
  • STATUS_BAD_VALUE (-2): Invalid or unsupported usage type
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_PERMISSION_DENIED (-9): Missing required privileges

getAudioDeviceListAsync()

getAudioDeviceListAsync: (device, role) => Promise<Object>

Retrieves a list of available audio devices with specified type and role.

Parameters

device

number

The device type to query from AudioDevice enum

role

number

The role to query from AudioRole enum:

  • ROLE_SOURCE (0): Input devices
  • ROLE_SINK (1): Output devices
  • ROLE_SOURCE_SINK (2): Both input and output

Returns

Promise<Object>

A promise that resolves to an array of AudioDeviceInfo objects Or rejects with:

  • STATUS_BAD_VALUE (-2): Invalid device type or role
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_DEAD_OBJECT (-5): Server communication error

getAudioUsageStatisticsAsync()

getAudioUsageStatisticsAsync: (usage) => Promise<Object>

Retrieves statistics about a specific audio usage type.

Parameters

usage

number

The audio usage type to query from AudioUsageType enum

Returns

Promise<Object>

A promise that resolves to an object containing:

  • active: boolean indicating if the usage is currently active
  • duration: number representing milliseconds since last state change

Or rejects with:

  • STATUS_BAD_VALUE (-2): Invalid usage type
  • STATUS_NO_INIT (-3): Audio system not initialized

getGlobalVolumeMuteAsync()

getGlobalVolumeMuteAsync: () => Promise<boolean>

Retrieves the current global mute state.

Returns

Promise<boolean>

A promise that resolves to:

  • true: All audio output is currently muted
  • false: Audio output is active Throws error with:
  • STATUS_NO_INIT (-3): Audio system not initialized

getMajorVersion()

readonly getMajorVersion: () => number

Gets the major version number of the AudioManagerClientTurboModule. Can be used to make version checks.

Returns

number

The major version number

Overrides

KeplerTurboModule.getMajorVersion


getMaxVolumeAsync()

getMaxVolumeAsync: () => Promise<number>

Gets the current maximum volume limit.

Returns

Promise<number>

A promise that resolves to:

  • 0-100: Current maximum volume limit
  • STATUS_NO_INIT (-3): Audio system not initialized

getMicMuteAsync()

getMicMuteAsync: () => Promise<boolean>

Retrieves the current mute state of the system microphones.

Returns

Promise<boolean>

A promise that resolves to:

  • true: Microphones are currently muted
  • false: Microphones are currently active Throws error with:
  • STATUS_NO_INIT (-3): Audio system not initialized

getMinorVersion()

readonly getMinorVersion: () => number

Gets the minor version number of the AudioManagerClientTurboModule. Can be used to make version checks.

Returns

number

The minor version number

Overrides

KeplerTurboModule.getMinorVersion


getMuteAsync()

getMuteAsync: (volType) => Promise<boolean>

Gets the mute state for a specific volume type.

Parameters

volType

number

The volume type to query

Returns

Promise<boolean>

A promise that resolves to:

  • true: The volume type is muted
  • false: The volume type is not muted Or rejects with:
  • STATUS_BAD_VALUE (-2): Invalid volume type
  • STATUS_NO_INIT (-3): Audio system not initialized

getPatchVersion()

readonly getPatchVersion: () => number

Gets the patch version number of the AudioManagerClientTurboModule. Can be used to make version checks.

Returns

number

The patch version number

Overrides

KeplerTurboModule.getPatchVersion


getSinkFormatsSelectionPolicyAsync()

getSinkFormatsSelectionPolicyAsync: () => Promise<number>

Gets the current audio sink formats selection policy.

Returns

Promise<number>

A promise that resolves to:

  • Current policy value from SinkFormatsSelectionPolicy enum
  • STATUS_NO_INIT (-3): Audio system not initialized

getSupportedPlaybackConfigurationsAsync()

getSupportedPlaybackConfigurationsAsync: (attributes, deviceType) => Promise<Object>

Queries supported playback configurations for given attributes and device.

Parameters

attributes

Object

AudioAttributes object specifying desired configuration

deviceType

number

The target device type

Returns

Promise<Object>

A promise that resolves to an array of supported configurations Or rejects with:

  • STATUS_BAD_VALUE (-2): Invalid attributes or device type
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_NOT_ENOUGH_DATA (-10): No configurations available

getSupportedRecordConfigurationsAsync()

getSupportedRecordConfigurationsAsync: (excludeDisconnectedDevice, sourceType) => Promise<Object>

Gets supported audio recording configurations.

Parameters

excludeDisconnectedDevice

boolean

If true, only returns configurations for connected devices

sourceType

number

The audio source type to query from AudioSource enum

Returns

Promise<Object>

A promise that resolves to an array of supported recording configurations Or rejects with:

  • STATUS_BAD_VALUE (-2): Invalid source type
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_NOT_ENOUGH_DATA (-10): No configurations available

getSupportedSinkFormatsSelectionPoliciesAsync()

getSupportedSinkFormatsSelectionPoliciesAsync: () => Promise<Object>

Gets the list of supported sink formats selection policies.

Returns

Promise<Object>

A promise that resolves to an array of supported policies, Or rejects with:

  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_NOT_ENOUGH_DATA (-10): No policies available

getSystemSoundThemeAsync()

getSystemSoundThemeAsync: () => Promise<String>

Retrieves the name of the current system sound theme.

Returns

Promise<String>

A promise that resolves to the current theme name Or rejects with:

  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_NO_FILE (-11): Theme not found

getSystemSoundThemeListAsync()

getSystemSoundThemeListAsync: () => Promise<Object>

Retrieves a list of available system sound themes.

Returns

Promise<Object>

A promise that resolves to an array of available sound theme names Or rejects with:

  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_NO_FILE (-11): Theme directory not found

getTelephonyMuteAsync()

getTelephonyMuteAsync: (device, address) => Promise<boolean>

Gets the mute state for telephony audio.

Parameters

device

number

The device type

address

String

Device identifier

Returns

Promise<boolean>

A promise that resolves to:

  • true: Telephony audio is muted
  • false: Telephony audio is not muted

Or rejects with:

  • STATUS_BAD_VALUE (-2): Invalid device or address
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_INVALID_OPERATION (-8): No active telephony session

getVolumeAsync()

getVolumeAsync: (type) => Promise<number>

Retrieves the current volume level for a specific audio type.

Parameters

type

number

The audio type to query. Same values as setVolumeAsync

Returns

Promise<number>

A promise that resolves to:

  • 0-100: Current volume level if successful
  • STATUS_BAD_VALUE (-2): Invalid audio type
  • STATUS_NO_INIT (-3): Audio system not initialized

isAvrcpAbsoluteVolumeEnabledAsync()

isAvrcpAbsoluteVolumeEnabledAsync: (btAddress) => Promise<boolean>

Checks if AVRCP absolute volume control is enabled for a Bluetooth device.

Parameters

btAddress

String

Bluetooth device address

Returns

Promise<boolean>

A promise that resolves to:

  • true: Absolute volume control is enabled
  • false: Absolute volume control is disabled

Or rejects with:

  • STATUS_BAD_VALUE (-2): Invalid address
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_INVALID_OPERATION (-8): Device not connected

isServerReadyAsync()

isServerReadyAsync: () => Promise<boolean>

Checks if the audio server is ready to process commands.

Returns

Promise<boolean>

A promise that resolves to:

  • true: Server is ready
  • false: Server is not ready

Throws error with:

  • STATUS_DEAD_OBJECT (-5): Server communication error

isUsageEnabledAsync()

isUsageEnabledAsync: (usage) => Promise<boolean>

Checks if audio playback is enabled for a specific usage type.

Parameters

usage

number

The usage type to query from types/AudioCoreClientTypes.AudioUsageType enum

Returns

Promise<boolean>

A promise that resolves to:

  • true: Usage is enabled
  • false: Usage is disabled

Or rejects with:

  • STATUS_BAD_VALUE (-2): Invalid usage type
  • STATUS_NO_INIT (-3): Audio system not initialized

playSystemSoundAsync()

playSystemSoundAsync: (soundType) => Promise<AudioStatus>

Plays a system sound.

Parameters

soundType

number

The type of system sound to play from AudioSystemSound enum

Returns

Promise<AudioStatus>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Sound played successfully
  • STATUS_BAD_VALUE (-2): Invalid sound type
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_INVALID_OPERATION (-8): System sounds are disabled
  • STATUS_NO_FILE (-11): Sound file not found

registerAudioEventObserverAsync()

registerAudioEventObserverAsync: (callback) => Promise<number>

Registers a callback to receive system-wide audio events. Only one callback can be registered at a time.

Parameters

callback

(value) => void

Function to receive audio events. Events include:

  • DEVICE_STATE_UPDATE (0): Audio device connection changes
  • VOLUME_UPDATE (1): Volume level changes
  • GLOBAL_VOLUME_MUTE_UPDATE (2): Global mute state changes
  • SERVER_DOWN/UP (3,4): Audio server state changes
  • AUDIO_USAGE_STATE_CHANGE (5): Usage state changes
  • MIC_MUTE_STATE_UPDATE (6): Microphone mute changes And others as defined in AudioEvent enum

Returns

Promise<number>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Callback registered successfully
  • STATUS_BAD_VALUE (-2): Invalid callback
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_ALREADY_EXISTS (-4): Callback already registered

setActiveVolumeAsync()

setActiveVolumeAsync: (volume) => Promise<number>

Sets the volume for the currently active audio stream.

Parameters

volume

number

The desired volume level (0-100)

Returns

Promise<number>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Volume set successfully
  • STATUS_BAD_VALUE (-2): Invalid volume value
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_INVALID_OPERATION (-8): No active stream
  • STATUS_PERMISSION_DENIED (-9): Missing required privileges

setGlobalVolumeMuteAsync()

setGlobalVolumeMuteAsync: (mute, flags) => Promise<number>

Sets the global mute state for all audio output. Requires privilege: com.amazon.audio.privilege.settings.control

Parameters

mute

boolean

True to mute all audio, false to restore audio

flags

number

Optional behavior flags (same as setVolumeAsync)

Returns

Promise<number>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Global mute state changed successfully
  • STATUS_PERMISSION_DENIED (-9): Missing required privilege
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_INVALID_OPERATION (-8): Operation not allowed in current state

setMaxVolumeAsync()

setMaxVolumeAsync: (maxVolume) => Promise<AudioStatus>

Sets the maximum volume limit for the system. Requires privilege: com.amazon.audio.privilege.settings.control

Parameters

maxVolume

number

Maximum volume limit (0-100)

Returns

Promise<AudioStatus>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Limit set successfully
  • STATUS_BAD_VALUE (-2): Invalid volume value
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_PERMISSION_DENIED (-9): Missing required privileges

setMicMuteAsync()

setMicMuteAsync: (mute) => Promise<number>

Controls the mute state of all microphones in the system.

Parameters

mute

boolean

True to mute microphones, false to unmute

Returns

Promise<number>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Mute state changed successfully
  • STATUS_PERMISSION_DENIED (-9): Missing required privilege
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_INVALID_OPERATION (-8): Operation not allowed in current state

setMuteAsync()

setMuteAsync: (volType, mute) => Promise<AudioStatus>

Sets the mute state for a specific volume type.

Parameters

volType

number

The volume type to mute/unmute

mute

boolean

True to mute, false to unmute

Returns

Promise<AudioStatus>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Mute state changed successfully
  • STATUS_BAD_VALUE (-2): Invalid volume type
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_PERMISSION_DENIED (-9): Missing required privileges

setSinkFormatsSelectionPolicyAsync()

setSinkFormatsSelectionPolicyAsync: (policy) => Promise<AudioStatus>

Sets the audio sink formats selection policy.

Parameters

policy

number

The desired policy from SinkFormatsSelectionPolicy enum:

  • AUTO (0): Automatically select based on sink capabilities
  • ENFORCE_PCM (1): Force PCM output
  • PASSTHROUGH_DDP (2): Allow Dolby Digital Plus passthrough
  • PASSTHROUGH_DD (3): Allow Dolby Digital passthrough
  • ENFORCE_DDP (4): Force Dolby Digital Plus encoding
  • ENFORCE_DD (5): Force Dolby Digital encoding

Returns

Promise<AudioStatus>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Policy set successfully
  • STATUS_BAD_VALUE (-2): Invalid policy
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_INVALID_OPERATION (-8): Policy not supported

setSystemSoundThemeAsync()

setSystemSoundThemeAsync: (soundTheme) => Promise<AudioStatus>

Sets the current system sound theme.

Parameters

soundTheme

String

The name of the theme to set

Returns

Promise<AudioStatus>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Theme set successfully
  • STATUS_BAD_VALUE (-2): Invalid theme name
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_NO_FILE (-11): Theme files not found
  • STATUS_INVALID_OPERATION (-8): System sounds are disabled

setTelephonyMuteAsync()

setTelephonyMuteAsync: (device, address, mute) => Promise<AudioStatus>

Sets the mute state for telephony audio.

Parameters

device

number

The device type

address

String

Device identifier

mute

boolean

True to mute, false to unmute

Returns

Promise<AudioStatus>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Mute state changed successfully
  • STATUS_BAD_VALUE (-2): Invalid device or address
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_INVALID_OPERATION (-8): No active telephony session
  • STATUS_PERMISSION_DENIED (-9): Missing required privileges

setVolumeAsync()

setVolumeAsync: (type, volume, flags) => Promise<number>

Sets the volume level for a specific audio type. Requires privilege: com.amazon.audio.privilege.settings.control

Parameters

type

number

The audio type to adjust. Valid values from AudioVolumeType:

  • VOLUME_TYPE_MEDIA (0): Media playback
  • VOLUME_TYPE_VOICE_ASSISTANT (1): Voice assistant
  • VOLUME_TYPE_VOICE_CALL (2): Phone calls
  • VOLUME_TYPE_RING (3): Ringtone
  • VOLUME_TYPE_ALARM (4): Alarms And others as defined in AudioVolumeType enum
volume

number

The desired volume level (0-100)

flags

number

Optional behavior flags:

  • VOLUME_FLAG_NONE (0): No special behavior
  • VOLUME_FLAG_SHOW_UI (1): Show volume UI
  • VOLUME_FLAG_PLAY_NOTIFICATION (2): Play volume change sound

Returns

Promise<number>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Volume set successfully
  • STATUS_PERMISSION_DENIED (-9): Missing required privilege
  • STATUS_BAD_VALUE (-2): Invalid parameters
  • STATUS_NO_INIT (-3): Audio system not initialized

startTelephonyAsync()

startTelephonyAsync: (device, address, mode) => Promise<number>

Starts telephony audio for a specific device.

Parameters

device

number

The device type from AudioDevice enum

address

String

Unique identifier for the device

mode

number

The telephony mode from AudioTelephonyMode enum:

  • MODE_NARROW_BAND (0): Standard telephony quality
  • MODE_WIDE_BAND (1): HD voice quality

Returns

Promise<number>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Telephony started successfully
  • STATUS_BAD_VALUE (-2): Invalid device, address or mode
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_INVALID_OPERATION (-8): Device busy or invalid state
  • STATUS_PERMISSION_DENIED (-9): Missing required privileges
  • STATUS_DEAD_OBJECT (-5): Device communication error

stopTelephonyAsync()

stopTelephonyAsync: (device, address) => Promise<number>

Stops telephony audio for a specific device.

Parameters

device

number

The device type from AudioDevice enum

address

String

Unique identifier for the device

Returns

Promise<number>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Telephony stopped successfully
  • STATUS_BAD_VALUE (-2): Invalid device or address
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_INVALID_OPERATION (-8): No active telephony session
  • STATUS_PERMISSION_DENIED (-9): Missing required privileges
  • STATUS_DEAD_OBJECT (-5): Device communication error

unregisterAudioEventObserverAsync()

unregisterAudioEventObserverAsync: () => Promise<number>

Unregister the previously registered audio event callback.

Returns

Promise<number>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Callback unregistered successfully
  • STATUS_BAD_VALUE (-2): No callback was registered
  • STATUS_NO_INIT (-3): Audio system not initialized

updateActiveVolumeAsync()

updateActiveVolumeAsync: (update, fallbackType) => Promise<number>

Updates the volume of the active stream, with a fallback type if no stream is active.

Parameters

update

number

The volume update value

fallbackType

number

The audio type to update if no stream is active

Returns

Promise<number>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Volume updated successfully
  • STATUS_BAD_VALUE (-2): Invalid update value or fallback type
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_PERMISSION_DENIED (-9): Missing required privileges

updateVolumeAsync()

updateVolumeAsync: (type, volume) => Promise<number>

Updates the volume level for a specific audio type.

Parameters

type

number

The audio type to update

volume

number

The volume update value

Returns

Promise<number>

A promise that resolves to:

  • STATUS_NO_ERROR (0): Volume updated successfully
  • STATUS_BAD_VALUE (-2): Invalid type or volume value
  • STATUS_NO_INIT (-3): Audio system not initialized
  • STATUS_PERMISSION_DENIED (-9): Missing required privileges

Methods

getConstants()?

optional getConstants(): object

Returns

object

Inherited from

KeplerTurboModule.getConstants


Last updated: Sep 30, 2025