Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selected audio device is speakerphone but sound always out from earpiece.(OPPO R15 Pro) #94

Open
AminHong opened this issue Jun 1, 2021 · 18 comments
Labels
bug Something isn't working

Comments

@AminHong
Copy link

AminHong commented Jun 1, 2021

Describe the bug
Selected audio device is speakerphone but sound always out from earpiece when used OPPO R15 Pro.

Application Logs
截圖 2021-06-01 上午11 53 45

AudioSwitch Version

  • Version: 1.1.1

Android Device (please complete the following information):

  • Device: OPPO R15 Pro (Android 10) ColorOS v7.1

Additional context
When i tried set audio manager mode to Mode_In_Call still invalid.

@AminHong AminHong added the bug Something isn't working label Jun 1, 2021
@Alton09
Copy link
Contributor

Alton09 commented Jun 1, 2021

Thanks for reaching out @AminHong ! We'll try to take a further look into this issue soon.

@kevinpatel20
Copy link

kevinpatel20 commented Aug 30, 2021

For me, selected mode shows wired headset but voice is coming from speaker. Works fine if i change it to wired headset using select and activate methods. Not sure how to reproduce. Occuring sometimes.

@ocarevs
Copy link
Collaborator

ocarevs commented May 9, 2023

@AminHong we have problems reproducing this issue with the same device. Is this still a problem on your side? Would it be possible for you to add logs with logginEnabled when you encounter this issue? Thanks

@misteloo
Copy link

misteloo commented Oct 6, 2023

I've same issue :)) , by code does not changing to speaker phone , only working with UI , means user must select speaker phone to change audio output.

@ocarevs
Copy link
Collaborator

ocarevs commented Oct 23, 2023

@misteloo What do you mean by "only working with UI"? Can you maybe add steps or code samples how you run in to the issue.

@AlanMTuring
Copy link

Getting the same issue on a few different devices, but only sometimes. I haven't recorded how often it happens, but from personal experience I would guess it happens about 25-50% of the time, where the audio comes through the earpiece after confirming that the speakerphone device was selected and activated.

It doesn't seem like the device matters, but here's the list of devices I've been able to reproduce on:

  • Pixel 4
  • Pixel 8 Pro
  • Samsung Galaxy S10

@ocarevs
Copy link
Collaborator

ocarevs commented Dec 18, 2023

@AlanMTuring Does it happen initially when activating AudioSwitch, i.e. audio output is from different AudioDevice than selected, or when switching devices? Is there a specific scenario where this happens more often than not?

@AlanMTuring
Copy link

We've only encountered the problem when switching devices, not on initial start.

As far as I can tell, there isn't a specific scenario when this happens. It can be on inbound and outbound calls, wifi or cellular. When it does happen, it's always for the duration of the call. So if it fails to switch at the beginning of the call, switching back to earpiece and waiting, then trying again always doesn't work. But if it works at the beginning of a call, we seem to be able to toggle successfully for the rest of the call.

When the audio switch gets started, I've put some logs in the AudioDeviceChangeListener and I've confirmed that after selectDevice and activate on the speaker get called, the new selectedAudioDevice is the speaker, but audio still comes quietly from the earpiece.

@ocarevs
Copy link
Collaborator

ocarevs commented Dec 19, 2023

@AlanMTuring I am struggling to reproduce the issue. Does this happen on your own app; can you reproduce the same issue on voice or video quickstarts? Also, is it possible for you to add some logs with AudioSwitch.loggingEnabled where you encounter the problem?

@AlanMTuring
Copy link

This happens on my app, looking into the voice quickstart.

I enabled AudioSwitch's logging and got this from a simple inbound call. Logs show no user selected device (defaults to earpiece) then I select the speakerphone. After the speakerphone is selected and the logs show it's the selected device, sound still comes from the earpiece.

AS/AudioSwitch          ---    D  Available AudioDevice list updated: [Earpiece(name=Earpiece), Speakerphone(name=Speakerphone)]
AS/AudioSwitch          ---    D  Current user selected AudioDevice = null
AS/AudioSwitch          ---    D  Available AudioDevice list updated: [Earpiece(name=Earpiece), Speakerphone(name=Speakerphone)]
AS/AudioSwitch          ---    D  Current user selected AudioDevice = null
AS/AudioSwitch          ---    D  Available AudioDevice list updated: [BluetoothHeadset(name=Google Pixel Watch 01PE), Earpiece(name=Earpiece), Speakerphone(name=Speakerphone)]
AS/AudioSwitch          ---    D  Current user selected AudioDevice = null
AS/AudioSwitch          ---    D  Available AudioDevice list updated: [BluetoothHeadset(name=Google Pixel Watch 01PE), Earpiece(name=Earpiece), Speakerphone(name=Speakerphone)]
AS/AudioSwitch          ---    D  Current user selected AudioDevice = null
AS/AudioSwitch          ---    D  Available AudioDevice list updated: [Earpiece(name=Earpiece), Speakerphone(name=Speakerphone)]
AS/AudioSwitch          ---    D  Current user selected AudioDevice = null
AS/AudioSwitch          ---    D  Available AudioDevice list updated: [BluetoothHeadset(name=Google Pixel Watch 01PE), Earpiece(name=Earpiece), Speakerphone(name=Speakerphone)]
AS/AudioSwitch          ---    D  Current user selected AudioDevice = null
AS/AudioSwitch          ---    D  Selected AudioDevice = Speakerphone(name=Speakerphone)
AS/AudioSwitch          ---    D  Available AudioDevice list updated: [BluetoothHeadset(name=Google Pixel Watch 01PE), Earpiece(name=Earpiece), Speakerphone(name=Speakerphone)]
AS/AudioSwitch          ---    D  Current user selected AudioDevice = Speakerphone(name=Speakerphone)

@ocarevs
Copy link
Collaborator

ocarevs commented Dec 20, 2023

There doesn't seem to be anything out of ordinary with the logs provided. @AlanMTuring Let me know if you were able to reproduce the issue with quickstart.

@softsan
Copy link

softsan commented Jan 5, 2024

This happens to me as well. Using latest Audio com.twilio:audioswitch:1.1.8 and com.twilio:voice-android:6.4.0
Any resolution / work around?

@afalls-twilio
Copy link
Contributor

@softsan does this happen with the normal quickstart or with the ConnecitonService flavor?

@chanphiromsok
Copy link

I have the same issue with Galaxy S10

@afalls-twilio
Copy link
Contributor

@chanphiromsok Thank you for reporting, did you have this issue with the QuickStart using ConnectionService?

@softsan
Copy link

softsan commented Apr 3, 2024

@softsan does this happen with the normal quickstart or with the ConnecitonService flavor?

With quickstart and with connectionService as well

@chanphiromsok
Copy link

chanphiromsok commented Apr 4, 2024

@chanphiromsok Thank you for reporting, did you have this issue with the QuickStart using ConnectionService?

I used this lib I don't know much about native it might hard to you https://github.com/jellyfish-dev/react-native-membrane-webrtc/tree/master
whereas this fork repo from twilio is work fine on my device he commit and fixed audio switch https://github.com/davidliu/audioswitch

@gustavobarbosab-aloware
Copy link

gustavobarbosab-aloware commented Aug 14, 2024

I have the same issue here...
My device is a Samsung S21 FE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants