Share via


MediaController.SetVolumeTo(Int32, AudioFlags) Method

Definition

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

[Android.Runtime.Register("setVolumeTo", "(II)V", "")]
public void SetVolumeTo (int value, Android.Media.AudioFlags flags);
[<Android.Runtime.Register("setVolumeTo", "(II)V", "")>]
member this.SetVolumeTo : int * Android.Media.AudioFlags -> unit

Parameters

value
Int32

The value to set it to, between 0 and the reported max.

flags
AudioFlags

Flags from AudioManager to include with the volume request.

Attributes

Remarks

Set the volume of the output this session is playing on. The command will be ignored if it does not support VolumeProvider#VOLUME_CONTROL_ABSOLUTE. The flags in AudioManager may be used to affect the handling.

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