180 likes | 356 Vues
Nokia Music Windows Phone 8 app-to-app APIs. Steve Robbins & Matt Cooper Chief Architect, Windows Phone Architect Nokia Music 2-031. Agenda. 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. Nokia Music.
E N D
Nokia Music Windows Phone 8 app-to-app APIs Steve Robbins & Matt Cooper Chief Architect, Windows Phone Architect Nokia Music 2-031
Agenda • 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
Nokia Music • Instant free music streamingon Lumia Windows Phones100s 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 • 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 in action • Demo • Create App that Launches Nokia Music • Extend App to search for artists • Benefits of App-to-App
Lumia and NFC • Get 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
Creating app-to-app protocol • Demo • Create an app-to-app custom protocol handlerRegister for a URI • Listen for and handle URI with a URIMapperCall URI from another app
Using App-to-App to make Launcher Tasks • newShowArtistTask() { • ArtistName= "Green Day" • }.Show();
Web fall-back • void Launch(UriappToAppUri, UriwebFallbackUri) • { • #ifWINDOWSPHONE8 • if (IsNokiaDevice()) • { • Launcher.LaunchUriAsync(appToAppUri); • return; • } • #endif • WebBrowserTask web = newWebBrowserTask(); • web.Uri = webFallbackUri; • web.Show(); • }
Nokia Music Launcher Tasks • Demo • Install API with NuGet • Replace URI-based App-to-App with MusicSearchTask • Take an existing Location-based app and add “Gigs Near You” feature
Nokia Music Windows Phone API • Makes it easy for you to integrate music data into your app. • MusicClientAsyncclient = newMusicClientAsync(AppId, AppCode); • var artists = awaitclient.GetTopArtists(); • list.ItemsSource = artists.Result; • // much later... • artist.PlayMix();
Using the Nokia Music Windows Phone API • Demo • Sign up for API Keys • Create application to show Top Artists by Genre
Summary • 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
Questions? • Source and examples: • http://nokia.ly/wpmusicapi • Contact Info: • @sr_gb • steve.robbins@nokia.com