1

Actually, I want to record the audio and allow the user to playback it(before saving) and after that prompt the user to give a particular name to the file for saving in to the memory(external storage).

Currently, I am able to record and playback the audio file(with the help of MediaRecorder and MediaPlayer), but unable to save it with some different name. So, I want to copy the content of recorded audio file to another file(empty) with user specified name.

Any help or guidance will be well appreciated.

1 Answer 1

1

Try this

File dir = Environment.getExternalStorageDirectory();
if(dir.exist()){
    File from = new File(dir,"from.mp4");
    File to = new File(dir,"to.mp4");
     if(from.exist())
        from.renameTo(to);
}
1
  • Thanks Ishan for the quick reply. That's what I want. Again thanks for the help. May 21, 2013 at 5:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.