Whenever the user joins a session, they always use the speaker instead of earpiece.
I am wondering if there a way to config the audio settings to let it use the earpiece instead?
I checked the SDK reference and can’t find any.
Which Android Video SDK version?
1.13.11
To Reproduce(If applicable)
Pick up a VOIP call, and verify the user is using speaker
Smartphone (please complete the following information):
Thanks for your reply. Apologies for the lack of clarity in my previous message.
We’re successfully using setSpeaker for user actions during a call. The issue is that we can’t configure the speaker mode when initializing the call. For example, this code doesn’t work as expected:
Hi @fteng, from my testing, I am able to call this function from my onUserAudioStatusChanged event callback function when the user joins the meeting. In the function, if the user is the current user, I call another function that executes this code:
fun testLogic(): Unit {
val user: ZoomVideoSDKUser = ZoomVideoSDK.getInstance().session.mySelf
val audioHelper: ZoomVideoSDKAudioHelper = ZoomVideoSDK.getInstance().audioHelper
val audioType: ZoomVideoSDKAudioStatus.ZoomVideoSDKAudioType? = user.audioStatus?.audioType
audioHelper.startAudio()
audioHelper.setSpeaker(false);
_zoomSessionUIState.update { it.copy( audioConnected = true, muted = true )}
}
Then I run ZoomVideoSDK.getInstance().audioHelper.speakerStatus to check that the status is updated.