Monday, May 5, 2014

Difficulties help: music player pause () after the start () error


Play Service in music, Pause, after performing mediaPlayer.pause () the music stops, the executive mediaPlayer.start when you want to play again () error, the program has been to determine the method to be run before:




Baidu still not been resolved for a long time, seeking guidance ah!
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
You can paste the full code
Reply:
Please use AIDL, you suspend a thread, and another thread started, will certainly be given, if you just write activity on the inside can not go wrong, you can try,,,
Reply:
Try calling player.start () before calling the next setDataSource () method and prepare ()
Reply:

Recommend a look at this, look at the document in each state to change this thing MediaPlayer each state
Reply:
To determine the next you start calling, posted the code too. You posted this code can be added to determine the current state of play in the front.
Reply:
reference to the third floor blovecat reply:
try to call before calling player.start () under setDataSource () method and prepare ()
< / fieldset>
Again calling setDataSource () that do not play from the beginning of what I need to play from where it was paused
Reply:
references, 4th Floor u014081087 reply:

Recommend a look at this, look at the document in each state to change this thing MediaPlayer each state

Read this document but for pause () the file directly execute start () on the line, but I run start () method on the error
Reply:
references, 5th Floor lxwwd reply:
you start to determine the next call, posted the code too. You posted this code can be added to determine the current state of play in the front.

When using the pause () method when the moratorium on the error with this almost Later, I applied a try-catch on the line, but again with the use of start () when you start on the error with try-catch, and the judge did not use the state of play

No comments:

Post a Comment