1

I'm writing an app that records sound using MediaRecorder. To get a directory where the recorded file should be saved I do this:

String fileName = Environment.getExternalStorageDirectory().getAbsolutePath() + "/record.3gp";

And then:

mRecorder.setOutputFile(fileName);

The audio records fine and I have the file saved but in the wrong place. The file is saved in my internal storage (I'm using GT-I9300). Why is that? How can I get the correct path for any external storage in any device? Thanks in advance.

fgsh
  • 17
  • 5
  • see this may be helpful http://stackoverflow.com/questions/5453708/android-how-to-use-environment-getexternalstoragedirectory – keshav Jan 19 '14 at 12:44

1 Answers1

0

Do you have a memory card in your device? Device that come with a large internal memory, like yours (16GB), will if, if a memory card is not present, return the internal memory location.

If not I assuming the card is not the primary external storage. Maybe this can be of help? How to list additional external storage folders (mount points)?

Community
  • 1
  • 1
Nicklas Gnejs Eriksson
  • 3,395
  • 2
  • 21
  • 19