HTC Wildfire – openRawResourceFd() fails
Nov 12th, 2010 | By fabian | Category: BlogAs I figured out in the Crash Reports, the FileDescriptor of “raw resource files”
java.io.FileDescriptor fd = getContext().getResources() .openRawResourceFd(R.raw.soundfile) .getFileDescriptor());
does not work properly. Therefore,
MediaPlayer player = new MediaPlayer(); player.setDataSource(fd); player.prepare();
throws a java.io.IOException on every HTC Wildfire device. I assume this happens because of a bug in the HTC Wildfire with Android 2.1-update1 firmware.
By the way, this bug appears also on Droid X devices.