I have just started to develop my first Android app, and I am having a hard time figuring out how to start the microphone and have it listen, which is a main feature of my app.
I’ve searched the Android docs and I can’t find much info on this.
Thanks in advance.
Maybe this can help (actually from the Android docs):
Audio Capture
android.media.MediaRecorder.MediaRecorder.setAudioSource(). You will probably want to useMediaRecorder.AudioSource.MIC.MediaRecorder.setOutputFormat().MediaRecorder.setOutputFile().MediaRecorder.setAudioEncoder().MediaRecorder.prepare()on theMediaRecorderinstance.MediaRecorder.start().MediaRecorder.stop().MediaRecorderinstance, callMediaRecorder.release()on it. CallingMediaRecorder.release()is always recommended to free the resource immediately.or:
Android Audio Recording Tutorial