There is a possibility along with a library AudioStreamer to use the API function speakerphone, excluding the effect of the positive feedback, as is done in telephone with speakerphone?
Interesting. You can add this effect with this code (depends on Reflection and JavaObject libraries):
B4X:
Sub SetEchoCanceler
Dim echo As JavaObject
echo.InitializeStatic("android/media/audiofx/AcousticEchoCanceler".Replace("/", "."))
If echo.RunMethod("isAvailable", Null) = True Then
Dim r As Reflector
r.Target = streamer
Dim AudioRecord As JavaObject = r.GetField("audioRecord")
echo.RunMethod("create", Array(AudioRecord.RunMethod("getAudioSessionId", Null)))
Log("echo set")
Else
Log("Echo not available")
End If
End Sub
Call it after you initialize the streamer.
Set the minSdkVersion to 16 (Android 4.1).