08-31-2022 03:33 PM - last edited on 03-16-2023 05:07 AM by Shahzad_Ismail
Solved! Go to Solution.
09-04-2022 12:24 PM
Hi Alberado21,
I was unable replicate your bluetooth issue with the tests I carried out ( a seven call test) after setting the bluetooth device connection after the first call (see EstablishedCallFragment below)
Below is some debug output from the calls that you can also verify for yourself with logcat in Android Studio.
I connected the bluetooth using the onAudioStateChanged from our Android Reference application hosted on github (https://github.com/sinch/rtc-reference-applications/) as shown below.
com.sinch.rtc.vvc.reference.app > features > calls > established > EstablishedCallFragment
private fun attachBindings() {
┊ binding.hangUpButton.setOnClickListener { onBackPressed() }
┊ binding.audioStateButton.onAudioStateChanged = { newState ->
┊ ┊ viewModel.onAudioStateChanged(newState)
┊ ┊ showModeMessage(newState)
┊ }
Can you verify that onAudioStateChanged toggles between devices when your call is connected?
In your application are you able to verify that on each call:
Here are some example logs showing the bluetooth connection verification upon changing the audioState from the sample application:
2022-09-04 20:43:57.967 21760-21760/com.sinch.rtc.vvc.reference.app D/BluetoothManager: Connected bluetooth headset: name=<your bluetooth device will be here>, state=CONNECTED, SCO audio=false
2022-09-04 20:43:57.986 2466-843/? I/HeadsetService: isHaDeviceConnected : false
2022-09-04 20:43:58.016 1350-1538/? D/BluetoothController: updateConnected = 2mConnectionState = 2
2022-09-04 20:43:58.064 1350-1350/? I/PowerUI: mBootCompleted = true | mFullyConnected = true
2022-09-04 20:43:58.350 2466-723/? I/HeadsetStateMachine: AudioConnecting: currentDevice=305075_1, msg=processAudioEvent: audio connected
2022-09-04 20:43:58.409 1350-1538/? D/BluetoothController: updateConnected = 2mConnectionState = 2
2022-09-04 20:43:58.413 21760-21760/com.sinch.rtc.vvc.reference.app D/BluetoothManager: +++ Bluetooth audio SCO is now connected
2022-09-04 20:43:58.413 21760-21760/com.sinch.rtc.vvc.reference.app D/AudioManagerInternal: --- updateAudioDeviceState: wired headset=false, BT state=SCO_CONNECTED
2022-09-04 20:43:58.413 21760-21760/com.sinch.rtc.vvc.reference.app D/AudioManagerInternal: Need BT audio: start=false, stop=false, BT state=SCO_CONNECTED
2022-09-04 20:43:58.419 21760-21760/com.sinch.rtc.vvc.reference.app D/BluetoothManager: onReceive done: BT state=SCO_CONNECTED
Logcat will shows the audio device on each received call. (The Sinch client was not stopped between tests)
2022-09-04 20:36:08.080 21760-3011/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=321 (321)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
2022-09-04 20:36:41.041 21760-3247/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=353 (353)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
2022-09-04 20:37:03.773 21760-3425/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=385 (385)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
2022-09-04 20:37:15.963 21760-3627/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=417 (417)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
2022-09-04 20:37:35.422 21760-3794/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=449 (449)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
2022-09-04 20:37:54.367 21760-3963/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=481 (481)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
2022-09-04 20:38:31.556 21760-4125/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=513 (513)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
I hope this gives you some insight into troubleshooting your bluetooth issue.
If you need us to look at any of your Android logcat output, please open a ticket with us.
09-01-2022 01:06 AM
Hi,
Thanks for your question. I have shared this information with our Product Team who will look into this and get back to you with an answer.
Kind regards,
09-01-2022 03:41 AM - last edited on 09-01-2022 07:01 AM by Shahzad_Ismail
Hi Abelardo21,
Thanks for the question! In regard to the : "reboot system" or "wipe the data " incident.
This sounds like you accidentally entered the Android fastboot menu. Were you pressing the volume switch at the same time as the power button. If you were this would send you to the menu allowing you to reboot and wipe the data amongst other functionality. More information on fastboot can be found at the Android developer site here: https://source.android.com/docs/core/bootloader
As your enquiry is missing some important information like your handsets, SDK version etc, I have sent you a message regarding your call attempts for some more information so we can assist you.
09-02-2022 07:30 AM
Hola, gracias.
Respecto al tema del bluetooth que mencioné ¿hay alguna solución?, también note que en algunas llamadas aproximadamente la numero 7 el audio comenzó a salir del speaker y bocina de forma intercalada en la misma llamada, cabe mencionar que en las otras que realice de prueba funciono el audio correctamente.
09-04-2022 12:24 PM
Hi Alberado21,
I was unable replicate your bluetooth issue with the tests I carried out ( a seven call test) after setting the bluetooth device connection after the first call (see EstablishedCallFragment below)
Below is some debug output from the calls that you can also verify for yourself with logcat in Android Studio.
I connected the bluetooth using the onAudioStateChanged from our Android Reference application hosted on github (https://github.com/sinch/rtc-reference-applications/) as shown below.
com.sinch.rtc.vvc.reference.app > features > calls > established > EstablishedCallFragment
private fun attachBindings() {
┊ binding.hangUpButton.setOnClickListener { onBackPressed() }
┊ binding.audioStateButton.onAudioStateChanged = { newState ->
┊ ┊ viewModel.onAudioStateChanged(newState)
┊ ┊ showModeMessage(newState)
┊ }
Can you verify that onAudioStateChanged toggles between devices when your call is connected?
In your application are you able to verify that on each call:
Here are some example logs showing the bluetooth connection verification upon changing the audioState from the sample application:
2022-09-04 20:43:57.967 21760-21760/com.sinch.rtc.vvc.reference.app D/BluetoothManager: Connected bluetooth headset: name=<your bluetooth device will be here>, state=CONNECTED, SCO audio=false
2022-09-04 20:43:57.986 2466-843/? I/HeadsetService: isHaDeviceConnected : false
2022-09-04 20:43:58.016 1350-1538/? D/BluetoothController: updateConnected = 2mConnectionState = 2
2022-09-04 20:43:58.064 1350-1350/? I/PowerUI: mBootCompleted = true | mFullyConnected = true
2022-09-04 20:43:58.350 2466-723/? I/HeadsetStateMachine: AudioConnecting: currentDevice=305075_1, msg=processAudioEvent: audio connected
2022-09-04 20:43:58.409 1350-1538/? D/BluetoothController: updateConnected = 2mConnectionState = 2
2022-09-04 20:43:58.413 21760-21760/com.sinch.rtc.vvc.reference.app D/BluetoothManager: +++ Bluetooth audio SCO is now connected
2022-09-04 20:43:58.413 21760-21760/com.sinch.rtc.vvc.reference.app D/AudioManagerInternal: --- updateAudioDeviceState: wired headset=false, BT state=SCO_CONNECTED
2022-09-04 20:43:58.413 21760-21760/com.sinch.rtc.vvc.reference.app D/AudioManagerInternal: Need BT audio: start=false, stop=false, BT state=SCO_CONNECTED
2022-09-04 20:43:58.419 21760-21760/com.sinch.rtc.vvc.reference.app D/BluetoothManager: onReceive done: BT state=SCO_CONNECTED
Logcat will shows the audio device on each received call. (The Sinch client was not stopped between tests)
2022-09-04 20:36:08.080 21760-3011/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=321 (321)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
2022-09-04 20:36:41.041 21760-3247/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=353 (353)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
2022-09-04 20:37:03.773 21760-3425/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=385 (385)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
2022-09-04 20:37:15.963 21760-3627/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=417 (417)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
2022-09-04 20:37:35.422 21760-3794/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=449 (449)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
2022-09-04 20:37:54.367 21760-3963/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=481 (481)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
2022-09-04 20:38:31.556 21760-4125/com.sinch.rtc.vvc.reference.app I/org.webrtc.Logging: WebRtcAudioRecordExternal: client audio source=VOICE_COMMUNICATION, client session id=513 (513)
┊ AudioDevice: type=TYPE_BLUETOOTH_SCO, id=28
I hope this gives you some insight into troubleshooting your bluetooth issue.
If you need us to look at any of your Android logcat output, please open a ticket with us.