According to the state machine diagram, the following code should be fine (after properly initializing the MediaPlayer instance):
        mediaPlayer.prepare();
        mediaPlayer.stop();
        mediaPlayer.prepare();
But it results in an IllegalStateException on the last call to prepare(). Why?
Note: I realize these three lines of code in isolation are useless, but it illustrates the problem I am having.
                        
Probably cause you didnt call start() before?
A MediaPlayer when ready will not start automatically, you must call start() so it can play it content.