6

how can I programmatically set the system volume for voice call when using a bluetooth earpiece?

Using this:

mAudioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL, myVolume, 0);

when a call (using the Earpice) is in progress it doesn't change anything.

I searched a lot before posting, but can't find any hint on how to do it.

Thanks in advance.

BrainCrash
  • 12,992
  • 3
  • 32
  • 38

2 Answers2

16

I also got in same problem and found out that, Android is using int 6 for bluetooth volume and not documented.

Just use 6 instead of AudioManager.STREAM_VOICE_CALL and try, It should work

Mehul Shah
  • 391
  • 3
  • 7
-1

This will work.

mAudioManager.setStreamVolume(6, value, 0 /* flags, 0 = no flags */);
4b0
  • 21,981
  • 30
  • 95
  • 142