5

I got a problem with my media player. Sometimes an error occurs and the on error is called. There I have the Mediaplayer and two int as parameters. The first int is "-38" and the second one is "0".

What does that mean?

EDIT: Code: http://pastebin.com/3XBaFYwF

Here's my logcat @Blundell LogCat:

http://pastebin.com/Wbjm3QCW

Mycoola
  • 1,135
  • 1
  • 8
  • 29
diiiz_
  • 607
  • 1
  • 6
  • 19

1 Answers1

11

error 38 means you are asking the MediaPlayer to do something when in the wrong state. You won't be able to fathom your error just from this.

Look at your Logcat before and after this error code and see what else has gone wrong. It's more than like you are calling start before the MediaPlayer has prepared or some other error of state.

see http://developer.android.com/reference/android/media/MediaPlayer.html#StateDiagram

state machine

Blundell
  • 75,855
  • 30
  • 208
  • 233
  • [VideoView](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/widget/VideoView.java) – Blundell Feb 10 '14 at 12:32
  • If you look at the source under the hood VideoView uses MediaPlayer. – Blundell Feb 10 '14 at 19:55
  • @diiiz_ yeah getting the currentposition of media player when it's not prepared raises this error: http://stackoverflow.com/a/30296898/325306 – fire in the hole May 18 '15 at 07:02