Can we differentiate between microphone of Headset & Android Device.
I am trying to record audio from microphone of device, but it routes the audio from the microphone of headset to android device. Is it possible that we can choose either to listen from mic of device or from mic of headset?
Please, help me. I will really appreciate.
Thanks.
Not really. If you plug in a wired headset, its microphone will be used as the input for voice call and recordings by default.
You could specify AudioSource.CAMCORDER for your MediaRecorder, which should give you one of the internal microphones rather than the headset mic. The problem is that you might get the microphone at the back of the device (if the device has a mic there), which might not be what you want.
AudioSource.VOICE_RECOGNITION
may map to the primary internal mic on some devices, but is not guaranteed to do so. There's also no guarantee about whether it will be tuned for near-field or far-field recording.