I'm trying to use the android.net.rtp
library to make a VoIP application. Its audio stream can be both sent and received correctly.
My problem is: The speaker of the callee's phone works fine, but the headset is muted at all time (even if I turn off the speaker).
My code:
AudioManager Audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
Audio.setMode(AudioManager.MODE_IN_COMMUNICATION);
Audio.setSpeakerphoneOn(true);
Audio.setMicrophoneMute(false);
sender = new RtpStreamSender(null, "169.0.199.19", AudioCodec.PCMU);