Android.Media.AudioManager.IOnAudioFocusChangeListener.OnAudioFocusChange Method
Called on the listener to notify it the audio focus for this listener has been changed.

Syntax

[Android.Runtime.Register("onAudioFocusChange", "(I)V", "GetOnAudioFocusChange_IHandler:Android.Media.AudioManager/IOnAudioFocusChangeListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnAudioFocusChange ([Android.Runtime.GeneratedEnum] AudioFocus focusChange)

Parameters

focusChange
the type of focus change, one of AudioManager.AudiofocusGain, AudioManager.AudiofocusLoss, AudioManager.AudiofocusLossTransient and AudioManager.AudiofocusLossTransientCanDuck.

Remarks

Called on the listener to notify it the audio focus for this listener has been changed. The focusChange value indicates whether the focus was gained, whether the focus was lost, and whether that loss is transient, or whether the new focus holder will hold it for an unknown amount of time. When losing focus, listeners can use the focus change information to decide what behavior to adopt when losing focus. A music player could for instance elect to lower the volume of its music stream (duck) for transient focus losses, and pause otherwise.

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 8