title: Record .m4a file Android
body: <p>How can i record M4A <em>audio</em> file with MediaRecorder in Android 2.2 ?<br>
  What output format, encoder and sampling rate i need to set ?</p>
  
  <p>I need to record it from microphone and save it in SDCARD</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I tried this code, but the result doesn't valid (not play in browser for example):</p>
  
  <pre><code>recorder = new MediaRecorder();
  recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
  recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
  recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); // error here ?!?
  recorder.setAudioSamplingRate(96000); // what value ?
  </code></pre>