开发者

Restoring Android Activity playing media

I'm working on a project that includes a media player. All is going fine, I select the media to be played from a play list and send it to the player activity and press play. The audio plays just like it should. Now, when I leave that activity (with the audio still playing) I'm unable to get back to that same activity, clicking the same item from the playlist starts a new activity with 开发者_如何学Gothe old media playing in the background still. How can bring back an old activity?


I don't get your question at all. However, look at the state diagram here:

http://developer.android.com/reference/android/media/MediaPlayer.html

And the other state diagram here:

http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle

Combine the MediaPlayer states and the Activity states in order to fulfill your need.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜