I\'m developing a video application. After 1st video playback done, in the \"OnCopletion\" I\'m trying to start a new one. But it just stops (not crashes) and do nothing. In
If you see this state diagram (taken from https://developer.android.com/reference/android/media/MediaPlayer.html#StateDiagram):
You will realize that you should call reset()
to get it back to the idle state. Only then can you call setDataSource()
Android docs say about IllegalStateException:
Thrown when an action is attempted at a time when the VM is not in the correct state.