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 java.lang.IllegalStateException in MediaPlayer](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3nS4_9wvAp_eIm3fEHnx1K4rXPH6HY6cS652DJKU9tyuMubQjvMRAXjQra2wKgAk5VIhPo48C_hRS_VNiFb2Iau9aWraOJnKfHGisR86IuM2E3pnUotEVyVO2OKnq4KeNYD8So8dw7IVF/s400/IllegalStateException.png)
Check it:
Implement ActionBar for our Media Player App
0 تعليقات