SpeechTilesAndamento Docs
Get started
SDK Reference · Method

setBackgroundAudioEnabled

Overrides automatic background-audio capability detection.

Declaration

public func setBackgroundAudioEnabled(_ enabled: Bool)

Overview

The override is retained and propagated to both the Conversation manager and STMediaRunner.

If the application does not set an override, initialization derives background-audio allowance from whether the application declares the audio value in UIBackgroundModes.

Initialization ordering

This setter does not require STConversationRunner.initialize() first. An explicit value is retained as an override and is honored when initialization later establishes background-audio capability. This makes it one of the configuration calls that can intentionally precede initialize().

Instance and iOS background limitations

  • Use one STConversationRunner instance for the application’s conversation workflows.
  • Concurrent conversations across multiple runner instances are not supported; sequential use of separately initialized instances has not been validated.
  • On iOS, enabling background audio does not allow a new microphone recording to start while the application is already in the background.

Initialization ordering

Set the background-audio override at the point specified by the API’s initialization contract. This setting does not override iOS restrictions on starting a new microphone recording while the app is already in the background.

Parameters

  • enabled — true explicitly enables the runner’s background-audio capability setting; false explicitly disables it. If this setter is not called, initialization derives the setting from the application’s UIBackgroundModes configuration. This setting does not itself grant OS background execution or microphone permissions.

See Also