Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Bluetooth Earpiece Volume

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.

like image 643
BrainCrash Avatar asked Dec 13 '22 17:12

BrainCrash


1 Answers

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

like image 162
Mehul Shah Avatar answered Jan 14 '23 22:01

Mehul Shah