The problem is that the microphone volume is too low when our application accesses through the microphone. When you have a low volume, you need to check a few things.
One of them is MODE OF AUDIO MANAGER when using a microphone.
Getting MODE Android Audio Manager ::
AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE); long mode = am.getMode(); Log.e(TAG,"audio mode "+mode);
Setting MODE in Android Audio Manager ::
AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE); am.setMode(3);
You can access the audio manager mode through this code for your application. There is 1.MODE_NORMAL
2.MODE_RINGTONE
3.MODE_IN_CALL
4.MODE_IN_COMMUNICATION
PS : whenever you change the AudioManager mode, after using the microphone, change it to MODE_NORMAL, otherwise it will not work after restarting the mobile device.
source share