Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Updated the example to match the modified Nokia Music API.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomi Paananen committed May 28, 2013
1 parent f3e5f75 commit 1a02dbd
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 19 deletions.
9 changes: 8 additions & 1 deletion MusicExplorer.sln
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2012 for Windows Phone
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MusicExplorer", "MusicExplorer\MusicExplorer.csproj", "{2926895D-90C8-4DD8-99AA-8F9B3ECE4DC6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{B9002466-1B8B-4E29-94DA-E785F4FE3455}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
5 changes: 2 additions & 3 deletions MusicExplorer/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Microsoft.Phone.Controls;
using Microsoft.Phone.Maps.Services;
using Microsoft.Phone.Shell;
using Nokia.Music.Phone;
using Nokia.Music;
using System;
using System.Collections.Generic;
using System.Device.Location;
Expand Down Expand Up @@ -314,8 +314,7 @@ private void InitializeNokiaMusicApi(string twoLetterCountryCode)
{
if (resolver == null)
{
resolver = new CountryResolver(MusicApi.MUSIC_EXPLORER_APP_ID,
MusicApi.MUSIC_EXPLORER_APP_TOKEN);
resolver = new CountryResolver(MusicApi.MUSIC_EXPLORER_APP_ID);
}

if (twoLetterCountryCode != null)
Expand Down
2 changes: 1 addition & 1 deletion MusicExplorer/MixesPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

using Nokia.Music.Phone;
using Nokia.Music;
using MusicExplorer.Models;

namespace MusicExplorer
Expand Down
23 changes: 12 additions & 11 deletions MusicExplorer/MusicApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,24 @@

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Nokia.Music.Phone;
using Nokia.Music.Phone.Tasks;
using Nokia.Music.Phone.Types;
using System.Windows;
using System.Windows.Threading;

using MusicExplorer.Models;
using System.Windows;
using System.Globalization;
using System.Collections.ObjectModel;
using Microsoft.Phone.Tasks;
using Microsoft.Phone.Shell;
using System.ComponentModel;

using Nokia.Music;
using Nokia.Music.Tasks;
using Nokia.Music.Types;

using MusicExplorer.Models;


namespace MusicExplorer
{
Expand Down Expand Up @@ -65,13 +68,11 @@ public void Initialize(string countryCode)
// Create a music client with correct AppId and Token/AppCode
if (countryCode == null || countryCode.Length != 2)
{
client = new MusicClient(MUSIC_EXPLORER_APP_ID,
MUSIC_EXPLORER_APP_TOKEN);
client = new MusicClient(MUSIC_EXPLORER_APP_ID);
}
else
{
client = new MusicClient(MUSIC_EXPLORER_APP_ID,
MUSIC_EXPLORER_APP_TOKEN,
countryCode.ToLower());
}
initialized = true;
Expand Down
13 changes: 10 additions & 3 deletions MusicExplorer/MusicExplorer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<ValidateXaml>true</ValidateXaml>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -195,14 +197,18 @@
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Phone.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Phone.Controls.Toolkit">
<Reference Include="Microsoft.Phone.Controls.Toolkit, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b772ad94eb9ca604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\WPtoolkit.4.2012.10.30\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.4.5.11\lib\sl3-wp\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.4.5.11\lib\sl4-windowsphone71\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Nokia.Music.Wp8">
<HintPath>..\packages\NokiaMusic.1.0.3\lib\windowsphone8\Nokia.Music.Wp8.dll</HintPath>
<HintPath>..\packages\NokiaMusic.2.2.0\lib\windowsphone8\Nokia.Music.Wp8.dll</HintPath>
</Reference>
<Reference Include="SharpGIS.GZipWebClient">
<HintPath>..\packages\SharpGIS.GZipWebClient.1.4.0.0\lib\wp71\SharpGIS.GZipWebClient.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
Expand All @@ -215,4 +221,5 @@
</Target>
-->
<ProjectExtensions />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
</Project>
7 changes: 7 additions & 0 deletions MusicExplorer/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="wp80" />
<package id="NokiaMusic" version="2.2.0" targetFramework="wp80" />
<package id="SharpGIS.GZipWebClient" version="1.4.0.0" targetFramework="wp80" />
<package id="WPtoolkit" version="4.2012.10.30" targetFramework="wp80" />
</packages>
4 changes: 4 additions & 0 deletions packages/repositories.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\MusicExplorer\packages.config" />
</repositories>

0 comments on commit 1a02dbd

Please sign in to comment.