I'm trying to mute my microphone in my Android application
audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
audioManager.setMicrophoneMute(true);
I also added the permission in the manifest
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
However, when I speak to my application, the logs return me exactly what I said which means the microphone is not muted.
Even the logs tell me that the mic should be muted. This :
Log.d("Muted ? : ", String.valueOf(audioManager.isMicrophoneMute()));
Display this log :
Muted ? : true
I really don't know what could be the problem. Do you have any idea about that ?
I tried the same, i thought the problem was in all devices, but some devices can mute their microphone, i tried the same solution of this answer:
setMicrophoneMute(boolean) doesn't work on some devices