I am writing an audio player using MediaPlayer, which allows the user to skip the real melody. A skip request may appear at any time, including between a call to MediaPlayer.prepareAsync and an upcoming call to onPrepared. Doc says:
It is important to note that the preparation state is a transition state, and the behavior of calling any method with a side effect when the MediaPlayer object is in preparation state is undefined.
Does this include calls to reset or even issue? Because if this is the case, then I will either have to wait for the onPrepared callback to reuse MediaPlayer or allocate a new MediaPlayer if I do not want to wait and release the obsolete from onprepared callback, right?
android
Simon
source share