Upload
brennan-olley
View
213
Download
0
Tags:
Embed Size (px)
Citation preview
Nokia Music Windows Phone 8 app-to-app APIsSteve Robbins & Matt CooperChief Architect, Windows Phone ArchitectNokia Music2-031
What is Nokia Music?
App-to-app APIs: How and why you should use them
Using the Nokia Music REST API to add music data to your app
Agenda
Nokia MusicInstant free music streamingon Lumia Windows Phones
100s of curated mixesCreate your own artist mixesOffline cachingGraphic EqualizerNo login, no adsGig Finder for live concerts
Launched in the US in September!
Nokia Music 3.5 for Windows Phone 8 includes App-to-App
In Windows Phone Store today!
Nokia Music app-to-app protocol
App-to-App protocols allow one app to launch another with a specific URI scheme.For more info, see Sean McKenna’s talk.
Launcher.LaunchUriAsync("nokia-music://show/artist/?name=Rihanna")
App-to-App protocols
Nokia Music app-to-app protocolsUse Case URI
Launch App nokia-music://
Search MP3 storenokia-music://search/anything/?term={term}
Show Artist Detailsnokia-music://show/artist/?id={id}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}
DemoCreate App that Launches Nokia MusicExtend App to search for artistsBenefits of App-to-App
App-to-app in action
Lumia and NFCGet an NFC tag to experiment from the Nokia stand!
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
DemoCreate an app-to-app custom protocol handlerRegister for a URIListen for and handle URI with a URIMapper Call URI from another app
Creating app-to-app protocol
Web fall-backvoid Launch(Uri appToAppUri, Uri webFallbackUri){ #if WINDOWSPHONE8 if (IsNokiaDevice()) { Launcher.LaunchUriAsync(appToAppUri); return; } #endif WebBrowserTask web = new WebBrowserTask(); web.Uri = webFallbackUri; web.Show();}
Nokia Music Launcher TasksUse Case Task
Launch App new LaunchTask().Show();
Search MP3 storenew MusicSearchTask() { SearchTerms = "Rihanna"}.Show();
Show Artist Details
new ShowArtistTask() { ArtistName = "Green Day”}.Show();
Play an Artist or Curated Mixnew PlayMixTask() {
ArtistName = "Green Day"}.Show();
Show Gigs Around You or Search for Gigs new ShowGigsTask().Show();
Show Curated Mixes new ShowMixesTask().Show();
DemoInstall API with NuGetReplace URI-based App-to-App with MusicSearchTaskTake an existing Location-based app and add “Gigs Near You” feature
Nokia Music Launcher Tasks
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;
// much later...
artist.PlayMix();
Nokia Music Windows Phone API
Nokia Music Windows Phone APIUse Case Method
Search Nokia Music var items = await client.Search("Green Day");
Gets available Mix Groups var mixGroups = await client.GetMixGroups();
Gets Mixes for a group var mixes = await client.GetMixes(myMixGroup);
Gets available genres var genres = await client.GetGenres();
Gets top artists for a genre
var artists = await client.GetTopArtistsForGenre(myGenre);
Gets chartsvar 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();
Gets products by an artist
var products = await client.GetArtistProducts(myArtist);
Gets similar artistsvar artists = await client.GetSimilarArtists(myArtist);
DemoSign up for API KeysCreate application to show Top Artists by Genre
Using the Nokia Music Windows Phone API
What is Nokia Music?App-to-app APIs: How and why you should use themUsing the Nokia Music REST API to add music data to your app
Summary
Source and examples:
http://nokia.ly/wpmusicapi
Contact Info:
@sr_gb
Questions?