mediaPlayer.setDataSource(fd) cause IOException: Prepare failed.: status=0x1

by Marco Nelissen » Fri, 07 Aug 2009 01:53:49 GMT


Sponsored Links
 




You need to use the version of setDataSource() that takes a FileDescriptor,
offset, and length.



Because setDataSource() doesn't parse the file, so the player engine is only
finding out that it can't play your apk file after you call prepare().

And why on earth is the same resource happily played one way but not


There is no design flaw. The issue is that you were only using the
FileDescriptor that you obtained from the AssetFileDescriptor that
openRawResource() returns. That file descriptor is for the entire apk file,
whereas you only want to play a specific part of that apk file.

Should I look in the  MediaPlayer.create code to see how they get

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Overlay never displayed in MapView

Do you use ItemizedOverlay or directly Overlay ?
I found that no one on the mailing list made ItemizedOverlay work,
included me.
I'll try to draw items myself like in the M5.





--~--~---------~--~----~------------~-------~--~----~

2. Android SMS

Hi,
this might seem silly, but I can't get the SMS app to work. Issues:

1. Can't type in the "To" field. Worked around by selecting a contact
from the addressbook.
2. Can't type a message! How do I select the "Open keyboard to compose
message" and actually type in?

Thanks,
Sylvester
--~--~---------~--~----~------------~-------~--~----~

3. Could not fine HelloAndroid.apk when lauching the HelloAndroid exampl

4. how to use webview to show lcoal javascript

5. Poll: How much will the first Android handset cost?

6. Treo Pro skin now available for Android Emulator!

7. Could not fine HelloAndroid.apk when lauching the HelloAndroid exampl