Windows 10通用音频后台播放器-无法注册后台任务:Run方法does 't fire
本文关键字:does 方法 Run fire 后台任务 注册 音频 10通 后台 播放器 Windows | 更新日期: 2023-09-27 17:53:15
开发Visual Studio 2015 RC - Windows 10通用后台音频播放器应用程序
我遵循了以下步骤。
创建了3个项目。
- MusicPlayer(空白应用程序- Windows通用项目)
- 播放列表(类库- Windows通用项目)
- AudioBackgroundAgent (Windows Runtime Component - Windows Universal Project)
遵循与https://code.msdn.microsoft.com/windowsapps/BackgroundAudio-63bbc319
相同的步骤一切正常,除了我无法注册和启动后台任务运行方法。
请告诉我,注册和启动后台任务的运行方法应该遵循哪些步骤。
谢谢。
可能需要在Package中添加入口点。下面是您可能需要的基于类似示例的Manifest部分:
<Extensions>
<Extension Category="windows.backgroundTasks" EntryPoint="SampleBackgroundAudioTask.MyBackgroundAudioTask">
<BackgroundTasks>
<Task Type="audio" />
</BackgroundTasks>
</Extension>
</Extensions>
在这种情况下,您可能还需要向主项目添加对代理项目的引用。AudioBackgroundAgent必须被1引用。MusicPlayer