Android MediaPlayer Problems :”Error (-38 , 0) ” and “stop called in state 1”

Before prepare(), you need first to call setDataSource(..).

The Media framework is a very strict state machine, and it’s really cumbersome to handle all the different states.

I’ve used this little wrapper that makes the coding/debugging a bit easier. You can give it a try.

Regarding emulator – note that not all file formats are supported on it.

Leave a Comment