USING THE
NOKIA MUSIC C# API
ON WINDOWS PHONE 8 / WINDOWS 8
Steve Robbins
Chief Architect
Nokia Music
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 ...
NOKIA MUSIC
Instant free music streaming
on Lumia Windows Phones.
100s of curated mixes
Create your own artist mixes
Offline...
NOKIA MUSIC APP-TO-APP APIS
Nokia Music for
Windows Phone 8
and Windows 8
include App-to-App APIs
NOKIA MUSIC APP-TO-APP APIS
App-to-App protocols allow one
app to launch another with a
specific URI scheme.
	
  
Launcher....
NOKIA MUSIC APP-TO-APP APIS
Launch App

nokia-­‐music://	
  

Search MP3 store

nokia-­‐music://search/anything/?term={ter...
DEMOS

Create App that Launches Nokia Music
Extend App to search for music
Benefits of App-to-App – Social Networks, NFC
APP-TO-APP AND NFC
ProximityDevice	
  device	
  =	
  ProximityDevice.GetDefault();	
  
if	
  (device	
  !=	
  null)	
  {	
...
APP-TO-APP SCHEMES
Lots of apps support App-To-App!…

http://nokia.ly/
wpapptoapp
APP-TO-APP IMPLEMENTATION
If you want to learn how to implement app-to-app, watch our //build/ 2012
talk at 14mins-22mins
...
LAUNCHER TASKS
new	
  ShowArtistTask()	
  {	
  
	
  	
  ArtistName	
  =	
  "Green	
  Day"	
  
}.Show();	
  
WEB FALL-BACK
void	
  Launch(Uri	
  appToAppUri,	
  Uri	
  webFallbackUri)	
  
{	
  
	
  	
  #if	
  WINDOWSPHONE8	
  
	
  ...
LAUNCHER TASKS
Launch App

new	
  LaunchTask().Show();

Search MP3 store

new	
  MusicSearchTask()	
  {	
  
	
  	
  	
  	
...
DEMOS

API installation with NuGet
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.	
  
MusicClient	
  api	
  =	
  
	
  	
  	
...
NOKIA MUSIC C# API
Search

var	
  items	
  =	
  await	
  api.SearchAsync("Green	
  Day");	
  

Search Artist By Location

...
NOKIA MUSIC C# API
Get products by an artist

var	
  p	
  =	
  await	
  api.GetArtistProductsAsync(myArtist);	
  

Get sim...
DEMOS

Sign up for API Keys

Create application to show artists on map
USER DATA ACCESS
Version 3.x allows easy access to user data:
•  Encapsulates OAuth2 flow.
•  Handles token caching and ren...
USER DATA ACCESS
Get Play History

var	
  items	
  =	
  await	
  api.GetUserPlayHistoryAsync();	
  

Get Top Artists

var	...
DEMOS

An application that creates wallpaper from recent playback
SUMMARY

Source and examples: http://nokia.ly/wpmusicapi
Contact @sr_gb
Upcoming SlideShare
Loading in...5
×

Wp dev day_using_the_nokia_music_apis

248

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
248
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Wp dev day_using_the_nokia_music_apis

  1. 1. USING THE NOKIA MUSIC C# API ON WINDOWS PHONE 8 / WINDOWS 8 Steve Robbins Chief Architect Nokia Music
  2. 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. 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. 4. NOKIA MUSIC APP-TO-APP APIS Nokia Music for Windows Phone 8 and Windows 8 include App-to-App APIs
  5. 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. 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. 7. DEMOS Create App that Launches Nokia Music Extend App to search for music Benefits of App-to-App – Social Networks, NFC
  8. 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. 9. APP-TO-APP SCHEMES Lots of apps support App-To-App!… http://nokia.ly/ wpapptoapp
  10. 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. 11. LAUNCHER TASKS new  ShowArtistTask()  {      ArtistName  =  "Green  Day"   }.Show();  
  12. 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. 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. 14. DEMOS API installation with NuGet Take an existing Location-based app and add “Gigs Near You” feature
  15. 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. 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. 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. 18. DEMOS Sign up for API Keys Create application to show artists on map
  19. 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. 20. USER DATA ACCESS Get Play History var  items  =  await  api.GetUserPlayHistoryAsync();   Get Top Artists var  items  =  await  api.GetUserTopArtistsAsync();
  21. 21. DEMOS An application that creates wallpaper from recent playback
  22. 22. SUMMARY Source and examples: http://nokia.ly/wpmusicapi Contact @sr_gb
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×