我已经实现了播放音频的Avplayer。我已经使用MPRemoteCommandCenter在锁屏上获得访问权限。我可以通过以下方式获得所有访问权限:
let commandCenter = MPRemoteCommandCenter.shared()
commandCenter.pauseCommand.addTarget { (event) -> MPRemoteCommandHandlerStatus in
//Update your button here for the pause command
return .success
}
commandCenter.playCommand.addTarget { (event) -> MPRemoteCommandHandlerStatus in
//Update your button here for the play command
return .success
}但我想要检测当用户点击音乐标题或logo或播放器从锁定屏幕。它会打开我们的应用程序。有可能买到吗?
我想打开一个控制器,当用户点击音乐播放器从锁定屏幕。
发布于 2019-02-28 20:30:08
当你的应用程序被激活时,你可以回应,但没有办法知道它是被激活的,因为用户在锁定屏幕中点击了音乐播放器。
https://stackoverflow.com/questions/54925590
复制相似问题