Increment or Decrement volume programmatically on Xiaomi device adjusts it by 10 steps instead of one step

12 views Asked by At

Does anyone know about this bug or how to solve it?

I found this issue on Xiaomi 12 lite 5g with Android 13.

I'm using the following code which works on other devices:

        mAudioManager = getSystemService(AUDIO_SERVICE) as AudioManager

            mAudioManager.adjustStreamVolume(
                AudioManager.STREAM_MUSIC,
                AudioManager.ADJUST_LOWER,
                0
            )
            mAudioManager.adjustStreamVolume(
                AudioManager.STREAM_MUSIC,
                AudioManager.ADJUST_RAISE,
                0
            )
0

There are 0 answers