About ringtone after joining session

Hello,

Phenomenon)
I’m playing ringtone from earpiece of the device, but after joining session and ZoomVideoSDKDelegate.onSessionJoin() event raised, ringtone becomes being played from speakerphone of the device.

What I tried)
I’ve tried to change it playing from earpiece again as the following with using android.media.AudioManager, but could not change it.

Step1) Change mode of AudioManager

audioManager.mode = AudioManager.MODE_RINGTONE

Step2) Prepare AudioDeviceInfo for earpiece

val device: AudioDeviceInfo? = with(audioManager.availableCommunicationDevices) {
    find { it.type == AudioDeviceInfo.TYPE_BUILTIN_EARPIECE }
}

Step3) Set earpiece as communication device

device?.let {
    audioManager.setCommunicationDevice(it)
}

Inquiry)
Would there be a way to change it to earpiece again?

Environment)
Platform: Android
Zoom SDK: us.zoom.videosdk:zoomvideosdk-core=1.12.5
Test Device: Pixel 3a (Android ver. 12.0)

Thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.