Sdílet prostřednictvím


AudioAttributes.VolumeControlStream Property

Definition

Returns the stream type matching this AudioAttributes instance for volume control.

public Android.Media.Stream VolumeControlStream { [Android.Runtime.Register("getVolumeControlStream", "()I", "", ApiSince=26)] get; }
[<get: Android.Runtime.Register("getVolumeControlStream", "()I", "", ApiSince=26)>]
member this.VolumeControlStream : Android.Media.Stream

Property Value

a valid stream type for Activity or stream volume control that matches the attributes, or AudioManager#USE_DEFAULT_STREAM_TYPE if there isn't a direct match. Note that USE_DEFAULT_STREAM_TYPE is not a valid value for AudioManager#setStreamVolume(int, int, int).

Attributes

Remarks

Returns the stream type matching this AudioAttributes instance for volume control. Use this method to derive the stream type needed to configure the volume control slider in an android.app.Activity with android.app.Activity#setVolumeControlStream(int) for playback conducted with these attributes. <BR>Do not use this method to set the stream type on an audio player object (e.g. AudioTrack, MediaPlayer) as this is deprecated, use AudioAttributes instead.

Java documentation for android.media.AudioAttributes.getVolumeControlStream().

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