AudioFocusRequestClass.Builder Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AudioFocusRequestClass.Builder(AudioFocus) |
Constructs a new |
AudioFocusRequestClass.Builder(AudioFocusRequestClass) |
Constructs a new |
AudioFocusRequestClass.Builder(AudioFocus)
Constructs a new Builder
, and specifies how audio focus
will be requested.
[Android.Runtime.Register(".ctor", "(I)V", "", ApiSince=26)]
public Builder (Android.Media.AudioFocus focusGain);
[<Android.Runtime.Register(".ctor", "(I)V", "", ApiSince=26)>]
new Android.Media.AudioFocusRequestClass.Builder : Android.Media.AudioFocus -> Android.Media.AudioFocusRequestClass.Builder
Parameters
- focusGain
- AudioFocus
the type of audio focus gain that will be requested
- Attributes
Remarks
Constructs a new Builder
, and specifies how audio focus will be requested. Valid values for focus requests are AudioManager#AUDIOFOCUS_GAIN
, AudioManager#AUDIOFOCUS_GAIN_TRANSIENT
, AudioManager#AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK
, and AudioManager#AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE
.
By default there is no focus change listener, delayed focus is not supported, ducking is suitable for the application, and the AudioAttributes
have a usage of AudioAttributes#USAGE_MEDIA
.
Java documentation for android.media.AudioFocusRequest.Builder.AudioFocusRequest$Builder(int)
.
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
AudioFocusRequestClass.Builder(AudioFocusRequestClass)
Constructs a new Builder
with all the properties of the AudioFocusRequest
passed as parameter.
[Android.Runtime.Register(".ctor", "(Landroid/media/AudioFocusRequest;)V", "", ApiSince=26)]
public Builder (Android.Media.AudioFocusRequestClass requestToCopy);
[<Android.Runtime.Register(".ctor", "(Landroid/media/AudioFocusRequest;)V", "", ApiSince=26)>]
new Android.Media.AudioFocusRequestClass.Builder : Android.Media.AudioFocusRequestClass -> Android.Media.AudioFocusRequestClass.Builder
Parameters
- requestToCopy
- AudioFocusRequestClass
the non-null AudioFocusRequest
to build a duplicate from.
- Attributes
Remarks
Constructs a new Builder
with all the properties of the AudioFocusRequest
passed as parameter. Use this method when you want a new request to differ only by some properties.
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.