Hi All!
Can someone please point to me what is wrong with my code?
try{
MediaPlayer p = new MediaPlayer();
p.setDataSource(getCacheDir() + "/temp.mp3");
p.prepare();
p.start();
}catch(Exception e){}
MediaPlayer p catches Exception whenever it calls prepare(). File temp.mp3 is already inside the cache folder and it is not corrupt or what so ever but it doesn't get played. Is it that MediaPlayer can't play files on cache?
I hope someone can give me an idea of what I have done wrong. Thanks in advance!