WebRTC Android: sound from phone speaker is going into conference through phone mic and causing echo

Some phones can't do hardware echo cancellation, even though they advertise it's available. Redmi Note 5 is definitely one of them, take a look at https://github.com/signalapp/Signal-Android/blob/master/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java, search for HARDWARE_AEC_BLACKLIST. So, to enable WebRTC AEC, use below methods of JavaAudioDeviceModule.class


(For reference, please have a look into createJavaAudioDevice() of PeerConnectionClient.java - Checkout official android example on googlesource.com