Sdílet prostřednictvím


MediaController.AdjustVolume(Adjust, AudioFlags) Method

Definition

Adjust the volume of the output this session is playing on.

[Android.Runtime.Register("adjustVolume", "(II)V", "")]
public void AdjustVolume (Android.Media.Adjust direction, Android.Media.AudioFlags flags);
[<Android.Runtime.Register("adjustVolume", "(II)V", "")>]
member this.AdjustVolume : Android.Media.Adjust * Android.Media.AudioFlags -> unit

Parameters

direction
Adjust

The direction to adjust the volume in.

flags
AudioFlags

Any flags to pass with the command.

Attributes

Remarks

Adjust the volume of the output this session is playing on. The direction must be one of AudioManager#ADJUST_LOWER, AudioManager#ADJUST_RAISE, or AudioManager#ADJUST_SAME. The command will be ignored if the session does not support VolumeProvider#VOLUME_CONTROL_RELATIVE or VolumeProvider#VOLUME_CONTROL_ABSOLUTE. The flags in AudioManager may be used to affect the handling.

Java documentation for android.media.session.MediaController.adjustVolume(int, 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

See also