How to record audio using audio api in Android?
问题 I have an LG Android Phone with Version 2.3.3. I need to connect a microphone in the headphone jack because I want to create an app that reads sound samples. How can I read samples programmatically?. 回答1: If you really want to read AudioSamples, I would suggest you to use AudioRecord instead of MediaRecorder since it gives you more control on AudioSamples... For that you can use following code, AudioCapturer is my wrapper class which I use for getting the samples from AudioRecord object.