AudioFocusRequestClass.Builder.SetForceDucking(Boolean) Method

Definition

Marks this focus request as forcing ducking, regardless of the conditions in which the system would or would not enforce ducking.

[Android.Runtime.Register("setForceDucking", "(Z)Landroid/media/AudioFocusRequest$Builder;", "", ApiSince=28)]
public Android.Media.AudioFocusRequestClass.Builder SetForceDucking(bool forceDucking);
[<Android.Runtime.Register("setForceDucking", "(Z)Landroid/media/AudioFocusRequest$Builder;", "", ApiSince=28)>]
member this.SetForceDucking : bool -> Android.Media.AudioFocusRequestClass.Builder

Parameters

forceDucking
Boolean

true to force ducking

Returns

this Builder instance. This value cannot be null.

Attributes

Remarks

Marks this focus request as forcing ducking, regardless of the conditions in which the system would or would not enforce ducking. Forcing ducking will only be honored when requesting AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK with an AudioAttributes usage of AudioAttributes.USAGE_ASSISTANCE_ACCESSIBILITY, coming from an accessibility service, and will be ignored otherwise.

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

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