Reputation: 6316
I have a1.ogg in the res/raw file
try {
mp = MediaPlayer.create(this, R.raw.a1);
} catch (Exception e)
{ Log.e("msg",e.getMessage()); }
Give me java.io.FileNotFoundException
The same file in wav format work
Upvotes: 1
Views: 740
Reputation: 65555
Try this:
MediaPlayer mp = new MediaPlayer();
mp.setDataSource("/data/test.ogg"); // replace with correct location
mp.prepare();
mp.start();
Upvotes: 1