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.