mwc/adc 2013 using the nokia music windows phone apis
DESCRIPTION
In this MWC/ADC 2013 presentation Steve Robbins, Chief Architect for Nokia Music, explores the features of the Nokia Music Windows Phone API and shows you how to install and use the API. He then describes how to code with the API to quickly add music features to existing apps, and demonstrates how to get music content into your app. For more information see www.developer.nokia.com/windowsphone and http://www.developer.nokia.com/Resources/Library/Lumia/#!nokia-music-apis.html. Find out more about the developer features of Nokia Lumia smartphones in the Lumia App Labs: http://www.developer.nokia.com/Develop/Windows_Phone/Learn/TRANSCRIPT
USING THE NOKIA MUSIC WINDOWS PHONE APIS Steve Robbins Chief Architect Nokia Music
MWC 2013
AGENDA What is Nokia Music?
Using our App-to-App APIs.
Using our C# API to add music data to your app.
NOKIA MUSIC Instant free music streaming on Lumia Windows Phones 100s of curated mixes
Create your own artist mixes
Offline caching Graphic Equalizer
No login, no ads
Gig Finder for live concerts
NOKIA MUSIC APP-TO-APP APIS
Nokia Music 3.5 for Windows Phone 8 added App-to-App APIs In the Windows Phone Store now!
NOKIA MUSIC APP-TO-APP APIS
App-to-App protocols allow one app to launch another with a specific URI scheme. Launcher.LaunchUriAsync( "nokia-‐music://show/artist/?name= Rihanna")
NOKIA MUSIC APP-TO-APP APIS
Show Product Details – e.g. an album nokia-‐music://show/product/?id={id}
Launch App nokia-‐music://
Search MP3 store nokia-‐music://search/anything/?term={term}
Show Artist Details nokia-‐music://show/artist/?name={name}
Play an Artist Mix nokia-‐music://play/artist/?artist={name}
Show Gigs Around You nokia-‐music://show/gigs/
Search for Gigs nokia-‐music://search/gigs/?term={term}
Show Curated Mixes nokia-‐music://show/mixes/
Play a Curated Mix nokia-‐music://play/mix/?id={id}
DEMOS Create App that Launches Nokia Music
Extend App to search for music
Benefits of App-to-App
ProximityDevice device = ProximityDevice.GetDefault(); if (device != null) { device.PublishBinaryMessage("WindowsUri:WriteTag", GetBufferFromUrl("nokia-‐music://play/mix/?id=35541874"), UnregisterUponSend); MessageBox.Show("Tap NFC tag to write link"); } See http://nokia.ly/nfcslides
APP-TO-APP AND NFC
If you want to learn how to implement app-to-app, watch our //build/ talk at 14mins-22mins http://nokia.ly/ buildmusicapi
APP-TO-APP IMPLEMENTATION
NOKIA MUSIC LAUNCHER TASKS
new ShowArtistTask() {
ArtistName = "Green Day"
}.Show();
void Launch(Uri appToAppUri, Uri webFallbackUri) { #if WINDOWSPHONE8 if (IsNokiaDevice()) { Launcher.LaunchUriAsync(appToAppUri); return; } #endif WebBrowserTask web = new WebBrowserTask(); web.Uri = webFallbackUri; web.Show(); }
WEB FALL-BACK
NOKIA MUSIC LAUNCHER TASKS Launch App new LaunchTask().Show();
Search MP3 store new MusicSearchTask() { SearchTerms = "Rihanna" }.Show();
Show Artist Details new ShowArtistTask() { ArtistName = "Green Day” }.Show();
Play an Artist or Curated Mix new PlayMixTask() {
ArtistName = "Green Day" }.Show();
Show Gigs Around You or Search for Gigs new ShowGigsTask().Show();
Show Curated Mixes new ShowMixesTask().Show();
DEMOS API installation with NuGet
Replace URI-based App-to-App with MusicSearchTask
Take an existing Location-based app and add “Gigs Near You” feature
NOKIA MUSIC C# API Makes it easy for you to integrate music data into your app. MusicClientAsync client = new MusicClientAsync(AppId, AppCode);
var artists = await client.GetTopArtists();
list.ItemsSource = artists.Result;
// when user selects artist...
artist.PlayMix();
NOKIA MUSIC C# API Search var items = await client.Search("Green Day"); Search Artist By Location var a = await client.GetArtistsAroundLocation(51.45,-‐2.6);
Get Search Suggestions var a = await client.GetSearchSuggestions("Poker");
Gets available genres var genres = await client.GetGenres();
Gets top artists for a genre var artists = await client.GetTopArtistsForGenre(myGenre);
Get Artist Suggestions var a = await client.GetArtistSearchSuggestions("Green");
Gets charts var albums = await client.GetTopProducts(Category.Album);
Gets a list of new releases var tracks = await client.GetNewReleases(Category.Track);
Gets the top artists var artists = await client.GetTopArtists();
NOKIA MUSIC C# API Gets products by an artist var products = await client.GetArtistProducts(myArtist);
Gets available Mix Groups var mixGroups = await client.GetMixGroups();
Gets Mixes for a group var mixes = await client.GetMixes(myMixGroup);
Gets similar artists var artists = await client.GetSimilarArtists(myArtist);
DEMOS Sign up for API Keys
Create application to show artists on map