Closed rocboronat closed 1 year ago
@rocboronat Activate can be called before the call is started too, infact, its probably easier.
Then, the ringtone will sound on the earpiece, right?
@rocboronat I see 2 issues here.. 1) after deactivate was called, did it not revert to the original routing? was 'ringtone' or 'normal' the previous setting prior to calling activate? 2) If the ringtone was triggered by the same application, yes, audioswitch will route it to the earpiece if that is what is selected. If the ringtone is from another application, then I believe its up that application how its routed.
According to the Twilio voice quickstart, the
activate()
method should be called when the call starts, which is in the Twilio'sonConnected()
method. But if I do it and calldeactivate()
when the call ends, the audio mode goes toringtone
instead ofnormal
. So, the user can't change the volume anymore, and the feedback he receives is like the app is actually on a call... or something weird like that. 💭 Something wrong is happening...That's because when
activate()
is called, you save the current audio mode which isringtone
because the ringtone is ringing. Later, when the call ends, you restore the audio mode, passing fromin communication
toringtone
again, instead ofnormal
.So, am I wrongly using AudioSwitch and I should call
activate()
in another place, or is this actually a bug?Thanks a lot for the support and also for open-sourcing this project 👍