Your SlideShare is downloading. ×
Wp dev day_using_the_nokia_music_apis
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Wp dev day_using_the_nokia_music_apis

219

Published on

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
219
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. USING THE NOKIA MUSIC C# API ON WINDOWS PHONE 8 / WINDOWS 8 Steve Robbins Chief Architect Nokia Music
  • 2. AGENDA What is Nokia Music? Introduction to App-to-App and using our App-to-App APIs Using our C# API to add music data to your app.
  • 3. NOKIA MUSIC Instant free music streaming on Lumia Windows Phones. 100s of curated mixes Create your own artist mixes Offline caching Graphic Equalizer Personalised Notifications No login, no ads Also on Windows 8, S40 and Web.
  • 4. NOKIA MUSIC APP-TO-APP APIS Nokia Music for Windows Phone 8 and Windows 8 include App-to-App APIs
  • 5. 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")  
  • 6. NOKIA MUSIC APP-TO-APP APIS 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}   Show Product Details – e.g. an album nokia-­‐music://show/product/?id={id}  
  • 7. DEMOS Create App that Launches Nokia Music Extend App to search for music Benefits of App-to-App – Social Networks, NFC
  • 8. APP-TO-APP AND NFC 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
  • 9. APP-TO-APP SCHEMES Lots of apps support App-To-App!… http://nokia.ly/ wpapptoapp
  • 10. APP-TO-APP IMPLEMENTATION If you want to learn how to implement app-to-app, watch our //build/ 2012 talk at 14mins-22mins http://nokia.ly/ buildmusicapi
  • 11. LAUNCHER TASKS new  ShowArtistTask()  {      ArtistName  =  "Green  Day"   }.Show();  
  • 12. WEB FALL-BACK void  Launch(Uri  appToAppUri,  Uri  webFallbackUri)   {      #if  WINDOWSPHONE8      if  (IsNokiaDevice())      {          Launcher.LaunchUriAsync(appToAppUri);          return;      }      #endif      WebBrowserTask  web  =  new  WebBrowserTask();      web.Uri  =  webFallbackUri;      web.Show();   }  
  • 13. 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();
  • 14. DEMOS API installation with NuGet Take an existing Location-based app and add “Gigs Near You” feature
  • 15. NOKIA MUSIC C# API Makes it easy for you to integrate music data into your app.   MusicClient  api  =                    new  MusicClient(ClientId);   var  artists  =            await  api.GetTopArtistsAsync();   list.ItemsSource  =  artists.Result;   //  when  user  selects  artist...     artist.PlayMix();    
  • 16. NOKIA MUSIC C# API Search var  items  =  await  api.SearchAsync("Green  Day");   Search Artist By Location var  a  =  await  api.GetArtistsAroundLocationAsync(51.4,-­‐2.6); Get Artist Suggestions var  a  =  await  api.GetArtistSearchSuggestionsAsync("Green"); Get Search Suggestions var  a  =  await  api.GetSearchSuggestionsAsync("Poker"); Get charts var  p  =  await  api.GetTopProductsAsync(Category.Album); Get a list of new releases var  p  =  await  api.GetNewReleasesAsync(Category.Track); Get the top artists Get available genres var  a  =  await  api.GetTopArtistsAsync();   var  g  =  await  api.GetGenresAsync(); Get top artists in genre var  a  =  await  api.GetTopArtistsForGenreAsync(myGenre);   Get top products in genre var  p  =  await  api.GetTopProductsForGenreAsync(myGenre); Get new releases in genre var  a  =  await  api.GetNewReleasesForGenreAsync(myGenre);  
  • 17. NOKIA MUSIC C# API Get products by an artist var  p  =  await  api.GetArtistProductsAsync(myArtist);   Get similar artists var  a=  await  api.GetSimilarArtistsAsync(myArtist); Get similar products Get available Mix Groups var  p  =  await  api.GetSimilarProductsAsync(product); var  g  =  await  api.GetMixGroupsAsync(); Get Mixes for a group var  m  =  await  api.GetMixesAsync(myMixGroup);
  • 18. DEMOS Sign up for API Keys Create application to show artists on map
  • 19. USER DATA ACCESS Version 3.x allows easy access to user data: •  Encapsulates OAuth2 flow. •  Handles token caching and renewal. •  User is in complete control. var  result  =          await  AuthenticateUserAsync(…);  
  • 20. USER DATA ACCESS Get Play History var  items  =  await  api.GetUserPlayHistoryAsync();   Get Top Artists var  items  =  await  api.GetUserTopArtistsAsync();
  • 21. DEMOS An application that creates wallpaper from recent playback
  • 22. SUMMARY Source and examples: http://nokia.ly/wpmusicapi Contact @sr_gb

×