0

I have an Android app that uses the MediaPlayer component to play movies. It works fine with all the Android devices, except on the Kindle Fire HD (and probably other Amazon devices as well as I haven't had the chance to test on others).

On the Kindle logcat prints the following output:

09-02 09:37:46.971  23979-23979/it.hearst.elledecortest I/VideoControllerView: VideoControllerView
09-02 09:37:46.971  23979-23979/it.hearst.elledecortest I/VideoControllerView: VideoControllerView
09-02 09:37:46.986  23979-23979/it.hearst.elledecortest D/MovieViewController: onViewAttachedToWindow
09-02 09:37:47.010      108-108/? E/ASFDummyExtractor: isASFParserAvailable
09-02 09:37:47.010      108-108/? W/ASFDummyExtractor: ASF parser is not available
09-02 09:37:47.010      108-108/? I/AwesomePlayer: Awsomeplayer is created
09-02 09:37:47.010      108-108/? I/AwesomePlayer: board file present
09-02 09:37:47.010      108-108/? I/AwesomePlayer: cabc present
09-02 09:37:47.010      108-108/? I/AwesomePlayer: setCabc file open !
09-02 09:37:47.010      108-108/? I/AwesomePlayer: setCabc ret = -22
09-02 09:37:47.010      108-108/? I/AwesomePlayer: cabc present
09-02 09:37:47.010      108-108/? I/AwesomePlayer: setCabc file open !
09-02 09:37:47.010      108-108/? I/AwesomePlayer: setCabc ret = -22
09-02 09:37:47.010    108-24246/? I/AwesomePlayer: cabc present
09-02 09:37:47.010    108-24246/? I/AwesomePlayer: setCabc file open !
09-02 09:37:47.010    108-24246/? I/AwesomePlayer: setCabc ret = -22
09-02 09:37:47.010  23979-23989/it.hearst.elledecortest E/MediaPlayer: error (1, -2147483648)
09-02 09:37:47.119  23979-23979/it.hearst.elledecortest E/MediaPlayer: Error (1,-2147483648)
09-02 09:37:47.142  23979-23979/it.hearst.elledecortest E/MediaPlayer: prepareAsync called in state 0

Anyone who has any insights on what could be going on? Thanks!

Valerio Santinelli
  • 1,592
  • 2
  • 27
  • 45

1 Answers1

0

error (1, -2147483648) is the general error for MediaPlayer. Oftenly, this error is associated to a non-readable file.

You should try reading this file with a file explorer

Hope it helps

Skaard-Solo
  • 682
  • 6
  • 11
  • You're probably right. I tried loading the very same movie from a web URL and it worked. Now the problem is that I cannot access the file myself with a file explorer as it's stored in the app's private folder "/data/data/etc..". Could it be that Amazon's AwesomePlayer cannot access the file for the same reason? – Valerio Santinelli Sep 02 '13 at 10:29
  • I don't think so, but It can be the player that is not able to read the file. Trying pushing it on the sdcard with `adb` in order to check if it is readable on your device – Skaard-Solo Sep 02 '13 at 10:32
  • 1
    I've come up with a hack. Whenever I'm running on the Kindle, I copy the file from the private folder to the sdcard. That way it works, but still I don't like this solution :) – Valerio Santinelli Sep 02 '13 at 10:51
  • Yes, it's readable. I copy the file from the private folder to the sdcard and then point the MediaPlayer to use the URL of that file instead of the original one and it works. – Valerio Santinelli Sep 02 '13 at 12:41
  • So, if you can't read it from the /data/... folder, I think you should check if the file really exist in that directory ;) – Skaard-Solo Sep 02 '13 at 12:43
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/36658/discussion-between-skaard-solo-and-valerio-santinelli) – Skaard-Solo Sep 02 '13 at 12:43
  • Can you share a sample of code that you are using to play content from /data/ so I can give it a try and see if I can spot anything. I know the usual recommendation is to put content in /raw/ ... also what version of Kindle Fire (Gingerbread or Ice Cream Sandwich)? – Offbeatmammal Sep 06 '13 at 02:00