I have to following code to launch and the audio recorder on Android:
And the following code to save the location to the newly recorded audio:
And this code to play (it works with no problem):
My problem is the following:
1. My filename (fileName) has no effect, the Uri returned from data.getData() returns in my last test run: content://media/external/audio/media/41. However, this file is created on my sdcard: recording34485.3gpp. If it is not possible to set custom location upon creating sound it is the location to this file I would like.
2. I want to mail this recording using the ACTION_SEND, but I can't attach the audio file, I guess because soundRecording.getLocation() points to content://media/external/audio/media/41 and not recording34485.3gpp:
File file = new File(soundRecording.getLocation());
Can anyone help me?