Rate this page:

IAudioFocusChangeListener

Interface that provides API to monitor and handle audio focus change events.

Methods

onAudioFocusChange

Copy URL

void

onAudioFocusChange(

int

focusChange
)

Triggered if the system audio focus is updated. Triggered on the main thread.

Parameters

  • focusChange:

    int

    The type of focus change, one of the following: - AudioManager.AUDIOFOCUS_GAIN - AudioManager.AUDIOFOCUS_GAIN_TRANSIENT - AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE - AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK - AudioManager.AUDIOFOCUS_LOSS - AudioManager.AUDIOFOCUS_LOSS_TRANSIENT - AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK

Returns

  • type:

    void