Musicoco icon indicating copy to clipboard operation
Musicoco copied to clipboard

在播放状态划掉多任务视图,notification视图保留,但是失去响应。

Open KnIfER opened this issue 7 years ago • 3 comments

在这种情况下,点击消息里的按钮(下一首,暂停,关闭)均无反应。 似乎,PlayNotifyManager中的receiver失效了。 而网易云音乐在此情况下仍然可以操作notification视图。

KnIfER avatar Jan 27 '18 13:01 KnIfER

同时音乐播放也会停止。

KnIfER avatar Jan 28 '18 01:01 KnIfER

嘿嘿正在魔改中。 思路是一个activity startService+bindService, 然后关键是 PlayNotifyManager 等由 playService持有 ,依然是处理进程间通信。 还有一个关键就是show的时候 调用activity.startForeground(PLAY_NOTIFY_ID, notification); 其中activity其实是service。。

KnIfER avatar Jan 29 '18 14:01 KnIfER

还有以一个关键应该是onpause的时候unbindService

KnIfER avatar Jan 30 '18 14:01 KnIfER