Force microphone input in Android

I have a weird setup where I am trying to record audio from an external device using a TRRS audio cable. The way it is supposed to work is I connect the audio cable to the device and then to the phone and then I use AudioRecorder to record to audio. Everything works fine on my HTC One M8 and I can record audio from the device. On my Samsung Galaxy S2, it records audio, but from the internal microphone.

I have confirmed that the problem is with the impedance of the mic input. If I add a resistor to the audio cable to increase the impedance of the microphone, then S2 will record from the device correctly.

So my question is, is there a way to force Android to use an external mic jack? I looked at an ACTION_HEADSET_PLUG request with microphone set to -1 for external, but failing due to permission errors. It seems this intent has been ported to protected permissions ( https://github.com/android/platform_frameworks_base/commit/8f014059d3084fcce9e82b4b1f8b8323744ac52d )

So, is there any other way to get the phone to use the mic jack without external hardware ?!

Thank!

Also, for the actual sound recording, the settings are: Sampling rate 44100 kHz 16-bit samples Mono channel Buffer set to AudioRecord.MinBufferSize ()

+3
android audio recording audio-recording microphone


source to share


No one has answered this question yet

Check out similar questions:

3606
Close / hide Android soft keyboard
3295
Why is the Android emulator so slow? How can we speed up the development of an Android emulator?
3288
Correct use cases for Android UserManager.isUserAGoat ()?
2609
Is there a unique identifier for an Android device?
2510
How to persist android activity state by persisting instance state?
2097
Is there a way to run Python on Android?
1844
What is "Context" on Android?
ten
Android: Forced external microphone (3.5mm input jack) to stay on
2
(Android) Receive audio signal from audio line instead of phone microphone
0
UBS cable disrupts microphone input from audio jack



All Articles
Loading...
X
Show
Funny
Dev
Pics