AudioFocusRequestClass.Builder.SetWillPauseWhenDucked(Boolean) Method

Definition

Declare the intended behavior of the application with regards to audio ducking.

[Android.Runtime.Register("setWillPauseWhenDucked", "(Z)Landroid/media/AudioFocusRequest$Builder;", "", ApiSince=26)]
public Android.Media.AudioFocusRequestClass.Builder SetWillPauseWhenDucked(bool pauseOnDuck);
[<Android.Runtime.Register("setWillPauseWhenDucked", "(Z)Landroid/media/AudioFocusRequest$Builder;", "", ApiSince=26)>]
member this.SetWillPauseWhenDucked : bool -> Android.Media.AudioFocusRequestClass.Builder

Parameters

pauseOnDuck
Boolean

use true if the application intends to pause audio playback when losing focus with AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK. If true, note that you must also set a focus listener to receive such an event, with setOnAudioFocusChangeListener(OnAudioFocusChangeListener,Handler).

Returns

this Builder instance. This value cannot be null.

Attributes

Remarks

Declare the intended behavior of the application with regards to audio ducking. See more details in the AudioFocusRequest class documentation.

Android reference for android.media.AudioFocusRequest.Builder.setWillPauseWhenDucked.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to