setVolume

fun setVolume(volume: Int, showVolumeBar: Boolean = false): Boolean

Sets the volume to the given volume value. If showVolumeBar is true, shows the volume bar.

Return

true if the volume was successfully set, false otherwise

Parameters

volume

the volume value to set, as an integer between 0 and maxVolume

showVolumeBar

whether to show the volume bar or not