Closed velevtzvetlin closed 2 years ago
@velevtzvetlin Thank you for filing a report. Can you see if the start is failing, thus never switching to the STARTED state? I suspect what is happening is that the required permissions are not being accepted by the user, then its failing to start.
@afalls-twilio thanks for the response, so im using this in a react-native package. Here is where i call start (when the app starts up and the module is instantiated with the app's context: https://github.com/NowRx/react-native-twilio-voice-sdk/blob/3cc6d8e9d9f84139a5cc61b1d3e4761239be1dc8/android/src/main/java/com/happytheapp/react/RNTwilioVoiceSDK/TwilioVoiceSDKModule.java#L83
This function attempts to create the call using twilio voice, starts a ringer loop, and calls manipulateAudioManagerBasedOnBLE
here: https://github.com/NowRx/react-native-twilio-voice-sdk/blob/3cc6d8e9d9f84139a5cc61b1d3e4761239be1dc8/android/src/main/java/com/happytheapp/react/RNTwilioVoiceSDK/TwilioVoiceSDKModule.java#L320
which selects a audio device and then calls activate. then on lines 173, 329
i am calling audioswitch.deactivate(). I understand your point but im not very experienced in java. Is calling start a synchronous task meaning once that call runs I can call activate right after it?
Seems like the exception is thrown in this method
That being said, I am calling the start method and ive verified i haven't called stop. Which would be the only method that puts the state into
STOPPED
. This isn't a consistent issue, in fact when im running my app locally i cannot reproduce it but my production app is throwing this error randomly on Sentry.