Added in API level 34

OnPreferredMixerAttributesChangedListener


interface OnPreferredMixerAttributesChangedListener
android.media.AudioManager.OnPreferredMixerAttributesChangedListener

Interface to be notified of changes in the preferred mixer attributes.

Note that this listener will only be invoked whenever setPreferredMixerAttributes(android.media.AudioAttributes,android.media.AudioDeviceInfo,android.media.AudioMixerAttributes) or clearPreferredMixerAttributes(android.media.AudioAttributes,android.media.AudioDeviceInfo) or device disconnection causes a change in preferred mixer attributes.

Summary

Public methods
abstract Unit

Called on the listener to indicate that the preferred mixer attributes for the audio attributes over the given device has changed.

Public methods

onPreferredMixerAttributesChanged

Added in API level 34
abstract fun onPreferredMixerAttributesChanged(
    attributes: AudioAttributes,
    device: AudioDeviceInfo,
    mixerAttributes: AudioMixerAttributes?
): Unit

Called on the listener to indicate that the preferred mixer attributes for the audio attributes over the given device has changed.

Parameters
attributes AudioAttributes: the audio attributes for playback This value cannot be null.
device AudioDeviceInfo: the targeted device This value cannot be null.
mixerAttributes AudioMixerAttributes?: the AudioMixerAttributes that contains information for preferred mixer attributes or null if preferred mixer attributes is cleared