简体   繁体   中英

Android - Keep VideoView playing after pressing HOME or BACK button

In Android development, is it possible to keep a VideoView playing after sending the user to HOME screen, so, when the user opens the Application once again, the video is already running?

Like, when I leave the activity, the video stops playing and when I go back to the same Activity, the video restarts. Is there some way to keep it running, like in the background?

Thank you!

在活动的onPause()中,您可以暂停视频,方法是通过getCurrentPosition()获得当前的seekLevel;如果正在播放视频,则在简历中,您可以从左移

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM