0

How can increase volume above safe level when headset connected, trying out this d't work, stop at safe level.

AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
audioManager.adjustStreamVolume(AudioManager.STREAM_MUSIC, AudioManager.ADJUST_RAISE, 0);
saikumar
  • 103
  • 1
  • 9

1 Answers1

0

How about instead of using the ADJUST_RAISE constant value, you use a variable like 20?

AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, 20, 0);

Try if that works.

Ronny K
  • 3,641
  • 4
  • 33
  • 43