ProjectedAudioManager


class ProjectedAudioManager


Class providing Projected device-specific functionality for clients using the android.media.AudioManager.

This class provides a way to connect to and communicate with the ProjectedAudioManager, which is expected to be running in the host process.

Use create to create an instance of this class. The connection is managed automatically with the provided LifecycleOwner.

Summary

Public companion functions

suspend ProjectedAudioManager
create(context: Context, lifecycleOwner: LifecycleOwner)

Connects to the service providing features for Projected devices and returns the ProjectedAudioManager when the connection is established.

Public functions

List<ProjectedAudioConfig>

Retrieves the supported audio capture configurations for the Projected device.

Public companion functions

create

suspend fun create(context: Context, lifecycleOwner: LifecycleOwner): ProjectedAudioManager

Connects to the service providing features for Projected devices and returns the ProjectedAudioManager when the connection is established.

Parameters
context: Context

The context to use for binding to the service.

lifecycleOwner: LifecycleOwner

The lifecycle owner to scope the service connection to.

Public functions

getSupportedAudioCaptureConfigs

Added in 1.0.0-alpha01
fun getSupportedAudioCaptureConfigs(): List<ProjectedAudioConfig>

Retrieves the supported audio capture configurations for the Projected device.

Returns
List<ProjectedAudioConfig>

A list of ProjectedAudioConfig objects containing the supported audio capture configurations.

Throws
kotlin.IllegalStateException

if the supported audio configs could not be retrieved.