twilio / voice-quickstart-android

Quickstart app for the Voice Android SDK
https://www.twilio.com/docs/api/voice-sdk/android/getting-started
MIT License
184 stars 140 forks source link

Changing volume in the VoiceActivity code #530

Closed D-I-S-C closed 2 years ago

D-I-S-C commented 2 years ago

Hi,

I have integrated the quickstart code within an app which I have tested on my own phone and Android emulator. All key functionalities seem to be working correctly, however the audio is extremely low. The maximum volume is very hard to hear.

How (and where) in the code can I change this in order to improve the volume?

kbagchiGWC commented 2 years ago

Hi @D-I-S-C

You can refer to the guide for handling low volume.

Is this device specific?

D-I-S-C commented 2 years ago

Hi @kbagchiGWC , the link you've provided is sending me back here

kbagchiGWC commented 2 years ago

Sorry about that - fixed the link to this.

D-I-S-C commented 2 years ago

Great - thank you! That looks interesting. I'll see what I can figure out from this documentation

D-I-S-C commented 2 years ago

@kbagchiGWC - the documentation suggests implementing the following code to improve low playback volume. I had a go but I can't seem to get it to work. Where exactly should I put this code?

int focusRequestResult = audioManager.requestAudioFocus(new AudioManager.OnAudioFocusChangeListener() {

                                   @Override
                                   public void onAudioFocusChange(int focusChange) {
                                   }
                               }, AudioManager.STREAM_VOICE_CALL,
        AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);
kbagchiGWC commented 2 years ago

You can refer to the usage in exampleCustomAudioDevice app.

D-I-S-C commented 2 years ago

Thank you!