Support custom AudioManager flags when changing device volume
I have my own volume control bar. I hope to call exoplayer Do not display the UI of the system when using the exoPlayer.setDeviceVolume() method.
The comments in the source code mention that it will let users decide whether to display the system UI. Will this function be provided, or is there any other way to set the system volume.
com.google.android.exoplayer2.StreamVolumeManager
// TODO(b/153317944): Allow users to override these flags.
private static final int VOLUME_FLAGS = AudioManager.FLAG_SHOW_UI;
Will this function be provided
I will mark this as a (low priority) feature request.
Is there any other way to set the system volume.
I don't think there's anything preventing you from calling AudioManager directly to adjust the volume, rather than calling ExoPlayer.setDeviceVolume(). In other words, I think you should be able to do what StreamVolumeManager does directly in your own application code, at which point you can specify whatever flags you like.