title: mediaRecorder.prepare(); IOEXCEPTION error
body: <p>Actually I am trying to record voice call using mediarecorder. My code is working for some devices but like lenovo sony it's not working. It's giving <code>IOEXCEPTION</code> error when <code>mediarecorder.prepare()</code> is called. This is my code </p>
  
  <pre><code>{
    cou = 1;
    String nam = "/"+name+"("+cou+")"+".wav";
    String voicefile = recordfolder + nam ;
    File vf = new File(voicefile);
    while (vf.exists()) {
      cou = cou + 1;
      nam = "/"+name+"("+cou+")"+".wav";
      voicefile = recordfolder + nam ;
      vf = new File(voicefile);
      System.out.println("cou valuee"+cou);
    }
    System.out.println("cou value isssssss" + cou);
    voicefile = recordfolder + nam ;
    try {
      mymediarecorder();
    }
    catch (Exception e {
      System.out.println("error to run mediarecorder function");
    }
    try {
      myAudioRecorder = new MediaRecorder();
      myAudioRecorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
      myAudioRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
      myAudioRecorder.setOutputFile(voicefile);
      myAudioRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
      System.out.println("audio file setup done");
    }
    catch (Exception e)
    {
      System.out.println("now problem hereee");
    }
    try {
      myAudioRecorder.prepare();
    }
    catch (IllegalStateException e) {
      System.out.println("problem to prepare .wav");
    }
    catch (IOException e) {
      System.out.println("problem to prepare .wav IOEXCEPTION ");
    }
    myAudioRecorder.start();
  }
  </code></pre>