AudioFocusRequestCompat


class AudioFocusRequestCompat


Compatibility version of an AudioFocusRequest.

Summary

Nested types

Builder class for AudioFocusRequestCompat objects.

Public functions

Boolean
equals(o: Any!)
AudioAttributesCompat

Gets the AudioAttributesCompat set for this AudioFocusRequestCompat, or the default attributes if none were set.

Handler

Gets the Handler to be used for the focus change listener.

Int

Gets the type of audio focus request configured for this AudioFocusRequestCompat.

AudioManager.OnAudioFocusChangeListener

Gets the focus change listener set for this AudioFocusRequestCompat.

Int
Boolean

Gets whether the application that would use this AudioFocusRequestCompat would pause when it is requested to duck.

Public functions

equals

fun equals(o: Any!): Boolean

getAudioAttributesCompat

Added in 1.1.0
fun getAudioAttributesCompat(): AudioAttributesCompat

Gets the AudioAttributesCompat set for this AudioFocusRequestCompat, or the default attributes if none were set.

getFocusChangeHandler

Added in 1.1.0
fun getFocusChangeHandler(): Handler

Gets the Handler to be used for the focus change listener.

Returns
Handler

the same Handler set in. setOnAudioFocusChangeListener.

getFocusGain

Added in 1.1.0
fun getFocusGain(): Int

Gets the type of audio focus request configured for this AudioFocusRequestCompat.

getOnAudioFocusChangeListener

Added in 1.1.0
fun getOnAudioFocusChangeListener(): AudioManager.OnAudioFocusChangeListener

Gets the focus change listener set for this AudioFocusRequestCompat.

hashCode

fun hashCode(): Int

willPauseWhenDucked

Added in 1.1.0
fun willPauseWhenDucked(): Boolean

Gets whether the application that would use this AudioFocusRequestCompat would pause when it is requested to duck. This value is only applicable on O and later.

Returns
Boolean

the duck/pause behavior.