开发者

Playing Audio file stored Application path of Android Application

开发者 https://www.devze.com 2023-04-05 04:21 出处:网络
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

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 开发者_StackOverflow中文版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");


try this url http://www.bogotobogo.com/Android/android24MediaB.html#AudioPlay

0

精彩评论

暂无评论...
验证码 换一张
取 消