SIGN UP
Navigation

IAudioFocusChangeListener

Interface that may be used to monitor and handle audio focus change events

Methods

void onAudioFocusChange(int focusChange)

Invoked when the audio focus of the system is updated. Invoked on 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