mwc/adc 2013 using the nokia music windows phone apis

18
USING THE NOKIA MUSIC WINDOWS PHONE APIS Steve Robbins Chief Architect Nokia Music MWC 2013

Upload: nokia-developer

Post on 01-Nov-2014

1.043 views

Category:

Technology


2 download

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

Page 1: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

USING THE NOKIA MUSIC WINDOWS PHONE APIS Steve Robbins Chief Architect Nokia Music

MWC 2013

Page 2: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

AGENDA What is Nokia Music?

Using our App-to-App APIs.

Using our C# API to add music data to your app.

Page 3: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

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

Page 4: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

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!

Page 5: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

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")  

Page 6: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

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}  

Page 7: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

DEMOS Create App that Launches Nokia Music

Extend App to search for music

Benefits of App-to-App

Page 8: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

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

Page 9: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

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

Page 10: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

NOKIA MUSIC LAUNCHER TASKS

new  ShowArtistTask()  {  

   ArtistName  =  "Green  Day"  

}.Show();  

Page 11: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

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

Page 12: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

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();

Page 13: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

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

Page 14: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

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();    

Page 15: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

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();  

Page 16: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

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);

Page 17: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

DEMOS Sign up for API Keys

Create application to show artists on map

Page 18: MWC/ADC 2013 Using the Nokia Music Windows Phone APIs

Source and examples: http://nokia.ly/wpmusicapi

Contact @sr_gb or [email protected]

SUMMARY