Play sound on headset and record from hands-free microphone

In android, you can play and record sound in speaker mode: setSpeakerphoneOn(boolean on) .

In this case, the system will use a loudspeaker and a special โ€œloudโ€ recording configuration for the microphone (I'm not sure how it is called correctly).

Hands-free mode is not compatible with headphones / headsets, so I do not use them with them. Everything is OK with headsets. But with headphones (without a microphone) I have to speak directly to the telephone microphone, because the sound recording level is much lower than in the speakerphone mode.

My questions are: is there a way to output audio to headphones and recordings using the aforementioned โ€œspeakerphoneโ€ recording configuration?

+5
source share

Source: https://habr.com/ru/post/1239032/


All Articles