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.

Check it:
Implement ActionBar for our Media Player App
Related Posts :
Nokia HERE, delivering maps for Apple iPhone, Android and Firefox OSNokia is taking its mapping solutions out to the wider world in the form of HERE, offering HERE for iOS for Apple iPhone and iPad users and … Read More...
Turn on Traffic Layer of GoogleMap V2To turn on/off the traffic layer of GoogleMap, simple call the method setTrafficEnabled(boolean enabled).Example: myMap.setTrafficEnabled(t… Read More...
Display ZoomControls, Compass and MyLocation buttons on GoogleMap.To enable/disable ZoomControls, Compass and MyLocation buttons on GoogleMap, call the following methods of the UiSettings for GoogleMap. set… Read More...
Enable/Disable various gestures for GoogleMapTo enable/disable various gestures for GoogleMap, call setRotateGesturesEnabled(boolean enabled), setScrollGesturesEnabled(boolean enabled),… Read More...
Reminder: Windows 8 Previews will expire SOON!Just a reminder, if you are using Windows 8 Preview, it will expire soon: Windows 8 Developer Preview and Consumer Preview will expire on J… Read More...
0 Response to "java.lang.IllegalStateException in Android MediaPlayer"
Post a Comment