How to keep playing music when user lock the screen?(Android)
-
I'm using QMediaplayer on Android, and I found that my code can play music in background(press HOME) if screen is on, or can play music after screen locked if the "Activity"(or UI? I don't know how to explain it) is on. The problem is that if you open the "Activity" and lock the screen, Mediaplayer will finish playing current media but won't jump to the next in playlist.
According to my poor English,I'll use Chinese to repeat this question.
我用QMediaplayer在Android上播放音频的时候遇到了点问题,就是如果你开着应用(前台运行)再锁屏他会播完当前歌曲但是不会自动跳转到列表里的下一首,这咋办。。
谢谢!Thanks a lot!