Language

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 playback when losing focus with LossTransientCanDuck. If true, also set a focus listener to receive the event, for example with SetOnAudioFocusChangeListener(AudioManager+IOnAudioFocusChangeListener, 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 AudioFocusRequestClass for more details.

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