开发者

Android List view to new intent/activity stops media player when going back

开发者 https://www.devze.com 2023-03-18 23:12 出处:网络
What I essentially have is tabview with a listview inside. When an item in开发者_开发百科 the listview is pressed, a new intent is created to take them to a different view. Inside this view is a media

What I essentially have is tabview with a listview inside. When an item in开发者_开发百科 the listview is pressed, a new intent is created to take them to a different view. Inside this view is a mediaplayer. My problem is that when I try to go back to the tabview my mediaplayer stops playing and the view doesn't stay intact. Is there anyway to fix this? I essentially want to be able to go back and forth and have the view with the mediaplayer stay intact. I hope this makes sense. Thanks.

EDIT: I solved this by using an activity group and by having the media player in a service


I solved this issue by using an activity group and having the media player in a service running in the background

0

精彩评论

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