Reputation: 655
I am trying to play a wav file which I have stored in application path but i am getting error like Media Player error(-38,0) . It says Media Player invalid
The same file when i store in sdCard Media Player plays it without any error
Hear is my code for getting the file from Application path
File sourceFile=new File(context.getApplicationContext().getFilesDir().getAbsolutePath()+"/source.wav");
Upvotes: 1
Views: 1091
Reputation: 800
try this url http://www.bogotobogo.com/Android/android24MediaB.html#AudioPlay
Upvotes: 1