AudioFocusRequestCompat
class AudioFocusRequestCompat
Compatibility version of an AudioFocusRequest.
Summary
Nested types |
|---|
|
Builder class for |
Public functions |
|
|---|---|
Boolean |
|
AudioAttributesCompat |
Gets the |
Handler |
Gets the |
Int |
Gets the type of audio focus request configured for this |
AudioManager.OnAudioFocusChangeListener |
Gets the focus change listener set for this |
Int |
hashCode() |
Boolean |
Gets whether the application that would use this |
Public functions
getAudioAttributesCompat
fun getAudioAttributesCompat(): AudioAttributesCompat
Gets the AudioAttributesCompat set for this AudioFocusRequestCompat, or the default attributes if none were set.
| Returns | |
|---|---|
AudioAttributesCompat |
non-null |
getFocusChangeHandler
fun getFocusChangeHandler(): Handler
Gets the Handler to be used for the focus change listener.
| Returns | |
|---|---|
Handler |
the same |
getFocusGain
fun getFocusGain(): Int
Gets the type of audio focus request configured for this AudioFocusRequestCompat.
getOnAudioFocusChangeListener
fun getOnAudioFocusChangeListener(): AudioManager.OnAudioFocusChangeListener
Gets the focus change listener set for this AudioFocusRequestCompat.
| Returns | |
|---|---|
AudioManager.OnAudioFocusChangeListener |
The |
willPauseWhenDucked
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. |