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 initializedSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid addressSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_PERMISSION_DENIED (-9)
: Missing required privilegesSTATUS_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 successfullySTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid or unsupported usage typeSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid addressSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_PERMISSION_DENIED (-9)
: Missing required privilegesSTATUS_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 successfullySTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid or unsupported usage typeSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 devicesROLE_SINK (1)
: Output devicesROLE_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 roleSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 typeSTATUS_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 typeSTATUS_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 typeSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 typeSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 initializedSTATUS_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 initializedSTATUS_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 initializedSTATUS_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 addressSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 typeSTATUS_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 addressSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 typeSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid sound typeSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_INVALID_OPERATION (-8)
: System sounds are disabledSTATUS_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 changesVOLUME_UPDATE (1)
: Volume level changesGLOBAL_VOLUME_MUTE_UPDATE (2)
: Global mute state changesSERVER_DOWN/UP (3,4)
: Audio server state changesAUDIO_USAGE_STATE_CHANGE (5)
: Usage state changesMIC_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid callbackSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid volume valueSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_INVALID_OPERATION (-8)
: No active streamSTATUS_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 successfullySTATUS_PERMISSION_DENIED (-9)
: Missing required privilegeSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid volume valueSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 successfullySTATUS_PERMISSION_DENIED (-9)
: Missing required privilegeSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid volume typeSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 capabilitiesENFORCE_PCM (1)
: Force PCM outputPASSTHROUGH_DDP (2)
: Allow Dolby Digital Plus passthroughPASSTHROUGH_DD (3)
: Allow Dolby Digital passthroughENFORCE_DDP (4)
: Force Dolby Digital Plus encodingENFORCE_DD (5)
: Force Dolby Digital encoding
Returns
Promise
<AudioStatus
>
A promise that resolves to:
STATUS_NO_ERROR (0)
: Policy set successfullySTATUS_BAD_VALUE (-2)
: Invalid policySTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid theme nameSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_NO_FILE (-11)
: Theme files not foundSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid device or addressSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_INVALID_OPERATION (-8)
: No active telephony sessionSTATUS_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 playbackVOLUME_TYPE_VOICE_ASSISTANT (1)
: Voice assistantVOLUME_TYPE_VOICE_CALL (2)
: Phone callsVOLUME_TYPE_RING (3)
: RingtoneVOLUME_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 behaviorVOLUME_FLAG_SHOW_UI (1)
: Show volume UIVOLUME_FLAG_PLAY_NOTIFICATION (2)
: Play volume change sound
Returns
Promise
<number
>
A promise that resolves to:
STATUS_NO_ERROR (0)
: Volume set successfullySTATUS_PERMISSION_DENIED (-9)
: Missing required privilegeSTATUS_BAD_VALUE (-2)
: Invalid parametersSTATUS_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 qualityMODE_WIDE_BAND (1)
: HD voice quality
Returns
Promise
<number
>
A promise that resolves to:
STATUS_NO_ERROR (0)
: Telephony started successfullySTATUS_BAD_VALUE (-2)
: Invalid device, address or modeSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_INVALID_OPERATION (-8)
: Device busy or invalid stateSTATUS_PERMISSION_DENIED (-9)
: Missing required privilegesSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid device or addressSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_INVALID_OPERATION (-8)
: No active telephony sessionSTATUS_PERMISSION_DENIED (-9)
: Missing required privilegesSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: No callback was registeredSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid update value or fallback typeSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_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 successfullySTATUS_BAD_VALUE (-2)
: Invalid type or volume valueSTATUS_NO_INIT (-3)
: Audio system not initializedSTATUS_PERMISSION_DENIED (-9)
: Missing required privileges
Methods
getConstants()?
optional
getConstants():object
Returns
object
Inherited from
KeplerTurboModule.getConstants
Last updated: Sep 30, 2025