0

here my code.where is my errors errors.the errors is file not found exception.

Uri video = Uri.parse("android.resource://com.ring.app/raw/"+a[i]+".mp3");
file= new File(video.toString());
try 
{ 
inputStream= new FileInputStream(file);
fos = super.openFileOutput("output"+i+".mp3", MODE_WORLD_READABLE);
byte buffer[]=new byte[1024];
while((len=inputStream.read(buffer))>0)
fos.write(buffer,0,len);
fos.close();
} 
Androider
  • 17
  • 1
  • 7

1 Answers1

2
String uri = "android.resource://" + getPackageName() + "/"+R.raw.filename;
MAC
  • 15,799
  • 8
  • 54
  • 95