0

I am trying to make audio calls using SIP in android. The issue I am facing right now is that when I plug in the wired headset into my device I can hear the audio well, I only cannot speak through the microphone on the headset. So, I end up using the inbuilt microphone on my device.

I know that the setWiredHeadset() is deprecated and cannot be used.

How do I solve this problem? Any help is appreciated. Thanks.

EDIT: I am using the Nexus 5 device for testing purposes

Anirudh
  • 2,080
  • 5
  • 21
  • 34
  • 1
    If the headset has a microphone, then that microphone should become the default input source unless you're in speakerphone mode. Without knowing exactly how you're setting things up audio-wise or seeing some logs it's going to be difficult for anyone to answer your question. – Michael Apr 04 '14 at 07:10

1 Answers1

0

(Since I can't comment, I have to answer - hoping this will help you.)

I am using the following code:

AudioRecord PCMAudioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC,
                        audioFrequency, audioChannelConfiguration, audioEncoding,
                        minBufferBytesSize);

And the microphone is automatically routed to wired headset's one when it is connected..

Eric Abramov
  • 462
  • 4
  • 19