如何在android内部存储器中保存音频文件
我想知道如何在android设备的内部存储器中保存音频文件。具体来说,我希望我的应用程序,记录声音从麦克风保存在内部存储此文件。我知道,对于外部存储,有如下内容:如何在android内部存储器中保存音频文件,android,audio,mediarecorder,internal-storage,Android,Audio,Mediarecorder,Internal Storage,我想知道如何在android设备的内部存储器中保存音频文件。具体来说,我希望我的应用程序,记录声音从麦克风保存在内部存储此文件。我知道,对于外部存储,有如下内容: outputFile = Environment.getExternalStorageDirectory()+"/myrecord.3gpp"; 内部存储是否也有类似的功能? 谢谢 试试这个 outputFile="/sdcard/myrecord.3gpp"; 使用getFilesDir() 欲了解更多信息,请查看我的答案……这
outputFile = Environment.getExternalStorageDirectory()+"/myrecord.3gpp";
内部存储是否也有类似的功能?
谢谢 试试这个
outputFile="/sdcard/myrecord.3gpp";
使用getFilesDir()
欲了解更多信息,请查看我的答案……这真的很有帮助。他不是说他想要内部存储吗?SD卡是外部的。
SDCardpath = getFilesDir();
myDataPath = new File(SDCardpath.getAbsolutePath()
+ "/.My Recordings");
// mydir = context.getDir("media", Context.MODE_PRIVATE);
if (!myDataPath.exists())
myDataPath.mkdir();
audiofile = new File(myDataPath + "/" + fileName);