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
Skip to main content

Constructors

new AudioFocusManager()

new AudioFocusManager(): AudioFocusManager

Returns

AudioFocusManager

Properties

defaultFocusSession

static defaultFocusSession: AudioFocusSession = null

Methods

createAudioFocusSessionAsync()

static createAudioFocusSessionAsync(): Promise<AudioFocusSession> Creates a new AudioFocusSession. Each session can independently manage audio focus requests and callbacks. Multiple sessions can be created to manage different audio streams independently. Example use cases:
  • Different sessions for music playback and navigation
  • Separate session for voice assistant responses
  • Independent session for game audio

Returns

Promise<AudioFocusSession> A promise that resolves to: Or rejects with:
  • STATUS_NO_MEMORY (-1): Failed to allocate session
  • STATUS_NO_INIT (-3): Audio focus system not initialized
  • STATUS_DEAD_OBJECT (-5): Server communication error

destroyAudioFocusSessionAsync()

static destroyAudioFocusSessionAsync(sessionObject): Promise<AudioFocusStatus> Destroys an existing audio focus session and releases all associated resources. This must be called when the session is no longer needed to free up system resources. Any active focus requests in this session will be automatically released. Important: Do not attempt to use the session object after destroying it.

Parameters

sessionObject
AudioFocusSession The session to destroy

Returns

Promise<AudioFocusStatus> A promise that resolves to:
  • AUDIO_FOCUS_STATUS_NO_ERROR (0): Session destroyed successfully
  • AUDIO_FOCUS_STATUS_BAD_VALUE (-2): Invalid session object
  • AUDIO_FOCUS_STATUS_NO_INIT (-3): Audio focus system not initialized
  • AUDIO_FOCUS_STATUS_INVALID_OPERATION (-8): Session already destroyed

Last modified on October 2, 2025