[Android] How to change audio output to loudspeakers with JitsiMeetView?

When join a meeting using JitsiMeetView sound play through the earpiece, And I can’t change it to phone speaker.
I’m using Jitsi meet SDK version 3.7.0
Android version 9

her is my code

 val options = JitsiMeetConferenceOptions.Builder()
                            .setServerURL(serverURL)
                            .setRoom(roomName)
                            .setWelcomePageEnabled(true)
                            .setVideoMuted(true)
                            .setAudioOnly(true) 
                            .build()

                        jitsiView?.join(options)
1 Like

I’m facing the same problem on my React Native App, where we’re showing a WebView that embed Jitsi. On some specific devices (like OnePlus 7), even if both participants has video active, the OnePlus user don’t hear anything or the audio is coming from the earpiece.

I searched the web and found nothing.

We tried to apply a temp workaround forcing the loudspeaker to be active when the call starts, but this is far from perfect (and doesn’t even consider headphones case).

On Android there is an AudioManager (something like this) but we ended up using the react-native-switch-audio-output library, that works for both devices, since our worflow passes almost entirely on the ReactNative part.

Remember, this is not the solution, but we cannot find any other solutions.