Could be done with:
val audioManager = getSystemService(Context.AUDIO_SERVICE) as AudioManager
// This shows the UI without changing the actual volume level
audioManager.adjustStreamVolume(
AudioManager.STREAM_MUSIC,
AudioManager.ADJUST_SAME,
AudioManager.FLAG_SHOW_UI
)
Could be done with: