从通用音量控制检测应用程序启动

发布于 2024-12-01 05:29:25 字数 304 浏览 0 评论 0原文

我有一个针对芒果设备的应用程序,它通过BackgroundAudioAgent 播放音乐。因此,它与通用音量控制 (UVC) 集成。

有没有办法通过点击 UVC 中的艺术家详细信息来检测应用程序何时启动?

或者,有没有办法设置深度链接供 UVC 使用?

我希望这样,当通过 UVC 启动应用程序时,我可以将用户带到“正在播放”页面,而不是主页。

更新
这也会影响从音乐和音乐中当前播放的图块启动应用程序。视频中心作为BackgroundAudioPlayer 自动与中心的这一部分集成。

I have an application, targeting mango devices, which plays music via a BackgroundAudioAgent. As such it integrates with the universal volume control (UVC).

Is there a way to detect when the application is launched by tapping the artists details in the UVC?

Alternatively, is there a way to set a deep link for the UVC to use?

I want this so that I can take the user to the "Now playing" page, rather than the main page, when the app is launched via the UVC.

Update
This also affects launching the app from the now playing tile in the Music & Video hub as the BackgroundAudioPlayer automatically integrates with this part of the hub.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沉鱼一梦 2024-12-08 05:29:25

使用 MediaHistory Zune Hub 集成可以解决这个问题。它还通过了 RC SDK 中的 Marketplace Test Kit 功能测试步骤,因此这是一个好兆头。

如果从 MSDN 上的示例开始,在后台音频代理中从 GetNextTrack()GetPreviousTrack() 调用以下代码意味着当您单击 UVC 或 Zune Now Playing您可以取回您在此处指定的导航查询字符串...

    private AudioTrack ChangeTrack()
    {
        AudioTrack track = _playList[currentTrackNumber];

        IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication();
        Stream s = isoStore.OpenFile("ApplicationIcon.png", FileMode.Open);

        MediaHistoryItem nowPlaying = new MediaHistoryItem();
        nowPlaying.Title = "Background Audio is playing!";
        nowPlaying.ImageStream = s;
        nowPlaying.PlayerContext.Add("keyString", track.Title);
        MediaHistory.Instance.NowPlaying = nowPlaying;

        return track;
    }

Using MediaHistory Zune Hub integration solves this problem. It also passes the Marketplace Test Kit capability test step in the RC SDK, so that’s a good sign.

If you start from the example on MSDN, calling the following code from GetNextTrack() and GetPreviousTrack() in the background audio agent means that when you click UVC or Zune Now Playing you can get back the navigation query string you specify here…

    private AudioTrack ChangeTrack()
    {
        AudioTrack track = _playList[currentTrackNumber];

        IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication();
        Stream s = isoStore.OpenFile("ApplicationIcon.png", FileMode.Open);

        MediaHistoryItem nowPlaying = new MediaHistoryItem();
        nowPlaying.Title = "Background Audio is playing!";
        nowPlaying.ImageStream = s;
        nowPlaying.PlayerContext.Add("keyString", track.Title);
        MediaHistory.Instance.NowPlaying = nowPlaying;

        return track;
    }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文