это так просто, но ошибочно ... попробуйте этот код:
File directoryTest = new File(
Environment.getExternalStorageDirectory(), "raw2sd");
try {
//coping sound file to sd
//defining specific directory
File soundDir = new File(directoryTest, "ORG");
//making directories
soundDir.mkdirs();
FileOutputStream sound = new FileOutputStream(
soundDir.getPath() + "/soundName.mp3");
InputStream is = getResources().openRawResource(R.raw.soundFile);
int a = is.available();
byte[] buf = new byte[a];
is.read(buf, 0, a);
sound.write(buf);
sound.flush();
sound.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
}
это 100% проверено.