+ All Categories
Home > Technology > LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

Date post: 01-Nov-2014
Category:
Upload: nokia-developer
View: 4,754 times
Download: 3 times
Share this document with a friend
Description:
These slide are from the lab that explores the features of the Nokia Music Windows Phone API and show you how to install and use the API. Steve Robbins, Chief Architect for Nokia Music, 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. It is recommended that you install the Microsoft Windows Phone SDK 8.0 to get the most out of this training lab. Also, it will be helpful to have a Nokia Lumia phone built on Windows Phone 8 available for testing. Check out details of the other Lumia App Labs, including the future schedule, here: http://www.developer.nokia.com/Develop/Windows_Phone/Learn/
Popular Tags:
16
USING THE NOKIA MUSIC WINDOWS PHONE APIS Steve Robbins Chief Architect Nokia Music LUMIA APP LABS #6
Transcript
Page 1: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

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

LUMIA APP LABS #6

Page 2: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

AGENDA What is Nokia Music?

Nokia Music Windows Phone App-to-App APIs.

Using the Nokia Music REST API to add music data to your app.

Page 3: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

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: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

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: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

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: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

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: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

DEMOS Create App that Launches Nokia Music

Extend App to search for music

Page 8: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

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: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

USING APP-TO-APP TO MAKE LAUNCHER TASKS new ShowArtistTask() {

ArtistName = "Green Day"

}.Show();

Page 10: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

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 11: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

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 12: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

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 13: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

NOKIA MUSIC WINDOWS PHONE 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 14: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

NOKIA MUSIC WINDOWS PHONE API 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);

Search Artist By Location var a = await client.GetArtistsAroundLocation(51.45,-2.6);

Gets top artists for a genre var artists = await client.GetTopArtistsForGenre(myGenre);

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(); Gets products by an artist var products = await client.GetArtistProducts(myArtist);

Gets similar artists var artists = await client.GetSimilarArtists(myArtist);

Gets available genres var genres = await client.GetGenres();

Page 15: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

DEMOS Sign up for API Keys

Create application to show artists on map

Page 16: LUMIA APP LAB: USING THE NOKIA MUSIC WINDOWS PHONE API

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

Contact @sr_gb or [email protected]

SUMMARY


Recommended