I am vexed by the variety of ways various phones can choose or choose
not to play an MP3 file I have in my app as a raw asset.

My preferred way to do this:
MediaPlayer mp = MediaPlayer.create(this, resId);

returns NULL on HTC Hero, and seemingly some Erises.

So when THAT happens, I do

mp = new MediaPlayer();

// copies the resource to a file with suffix .mp3
String fname = copyResourceToFile(resId, ".mp3");
mp.setDataSource(fname);
mp.prepare();

But, in one case at least on an Eris, I still saw a machine report an
IOException on mp.prepare(), with status 0x01

Is there some way I can get this to just work?


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to