diff --git a/android/sdk/src/main/java/org/jitsi/meet/sdk/AudioModeModule.java b/android/sdk/src/main/java/org/jitsi/meet/sdk/AudioModeModule.java index 9cd59cfab..2c131f6c1 100644 --- a/android/sdk/src/main/java/org/jitsi/meet/sdk/AudioModeModule.java +++ b/android/sdk/src/main/java/org/jitsi/meet/sdk/AudioModeModule.java @@ -16,6 +16,7 @@ package org.jitsi.meet.sdk; +import android.app.Activity; import android.content.Context; import android.media.AudioManager; import android.os.Build; @@ -276,6 +277,15 @@ class AudioModeModule extends ReactContextBaseJavaModule { return; } + Activity currentActivity = getCurrentActivity(); + if (currentActivity != null) { + if (mode == DEFAULT) { + currentActivity.setVolumeControlStream(AudioManager.USE_DEFAULT_STREAM_TYPE); + } else { + currentActivity.setVolumeControlStream(AudioManager.STREAM_VOICE_CALL); + } + } + runInAudioThread(new Runnable() { @Override public void run() {