How to use the microphone on Android -


i have started develop first android app, , having hard time figuring out how start microphone , have listen, main feature of app.

i've searched android docs , can't find info on this.

thanks in advance.

maybe can (actually android docs):
audio capture

  1. create new instance of android.media.mediarecorder.
  2. set audio source using mediarecorder.setaudiosource(). want use mediarecorder.audiosource.mic.
  3. set output file format using mediarecorder.setoutputformat().
  4. set output file name using mediarecorder.setoutputfile().
  5. set audio encoder using mediarecorder.setaudioencoder().
  6. call mediarecorder.prepare() on mediarecorder instance.
  7. to start audio capture, call mediarecorder.start().
  8. to stop audio capture, call mediarecorder.stop().
  9. when done mediarecorder instance, call mediarecorder.release() on it. calling mediarecorder.release() recommended free resource immediately.

or:
android audio recording tutorial


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -