Tuesday, March 13, 2012

java.lang.IllegalStateException in Android MediaPlayer

In the previous exercises of playing video using MediaPlayer, setDataSource() throws java.lang.IllegalStateException sometimes. MAY BE because the mediaPlayer still in stopping, preparing, or doing something else on last loaded video. My solution is to release the last mediaPlayer and new another mediaPlay again. It seem work fine.
java.lang.IllegalStateException in MediaPlayer

Check it: Implement ActionBar for our Media Player App

No comments:

Post a Comment