gpt4 book ai didi

c# - 如何在 Windows Phone 8 中使用诺基亚音乐 API

转载 作者:行者123 更新时间:2023-11-30 18:31:57 25 4
gpt4 key购买 nike

我使用以下代码使用 Nokia Music API 获取流派。

 client.GetGenres((ListResponse<Genre> response) =>
{
Dispatcher.BeginInvoke(() =>
{
this.Generic.ItemsSource = response.Result.ToList();
if (response.Result == null || response.Result.Count() == 0)
MessageBox.Show("No Result available");
});
});

我已成功获取流派 和所有详细信息,但如何检索所有轨道并播放选定的轨道。

最佳答案

根据Nokia Developer API Documentation

要播放特定艺术家,请使用诺基亚 API 音乐启动器

The following method from Music Explorer's MusicApi shows how simple it is to launch Nokia Music application to play artist mix. Nokia Music app can be launched just as easily into a product or artist state using Nokia Music API. Some of the launcher methods in Nokia Music API require unique ids of artists, mixes and products. These ids are received in responses from Nokia Music API's other services.

using Nokia.Music.Phone;
using Nokia.Music.Phone.Tasks;

...

namespace MusicExplorer
{
...

public class MusicApi
{
...

public void LaunchArtistMix(string artistName)
{
...

PlayMixTask task = new PlayMixTask();
task.ArtistName = artistName;
task.Show();
}

...
}
}

我没有看到任何关于列出专辑内容的具体信息,但您可以利用 GetArtistProducts() 来执行此操作

client.GetArtistProducts(
(ListResponse<Product> response) =>
{
// Use results
},

关于c# - 如何在 Windows Phone 8 中使用诺基亚音乐 API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19181420/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com