Nokia Music app-to-app protocol for Windows Phone 8
This article explains how to access Nokia Music services using the Nokia Music app's published app-to-app protocol.
Article Metadata
Tested with
Compatibility
Article
Contents |
Introduction
Windows Phone 8 exposes an app-to-app protocol API for 3rd party applications. This can be used to launch the Nokia Music app with the Launching API for Windows Phone, search for an artist or an album, get details of a particular song or an album, get nearest gigs etc. This article describes how to use Nokia Music app-to-app protocol in an application to access the Nokia Music service.
What is app-to-app protocol ?
App-to-app protocols allow one app to launch another app with a specific URI Scheme. With Windows Phone 8, we can also register our app as 3rd party application to support app-to-app protocol and can allow other app to open our app and use elements of our app into their app.
But here we will see how to use Nokia Music API Launchers for Windows Phone 8 to use various services of Nokia Music. To call app-to-app protocol, we need to use Launcher.LaunchUriAsync(Uri) method and pass URI schema in it. For example, to launch Nokia Music app from other app, call Launcher.LaunchUriAsync(Uri) with URI Schema nokia-music://
Windows.System.Launcher.LaunchUriAsync(new Uri(“nokia-music://”));
Nokia Music app-to-app protocol
Here are the list of Nokia Music app-to-app protocol with example.
Launch App
| Task | URI |
|---|---|
| Launch App | nokia-music:// |
Example:
Windows.System.Launcher.LaunchUriAsync(new Uri(“nokia-music://”));
Search Artist
| Task | URI |
|---|---|
| Search | nokia-music://search/anything/?term={searchtext} |
Example:
Windows.System.Launcher.LaunchUriAsync(new Uri(“nokia-music://search/anything/?term=green day”));
Show Artist Details
| Task | URI |
|---|---|
| Show Artist Details By Id | nokia-music://show/artist/?id={id} |
| Show Artist Details By name | nokia-music://show/artist/?name={name} |
Example:
Windows.System.Launcher.LaunchUriAsync(new Uri(“ nokia-music://show/artist/?name=green day”));
Play Artist Mix
| Task | URI |
|---|---|
| Play an Artist Mix | nokia-music://play/artist/?artist={name} |
Example:
Windows.System.Launcher.LaunchUriAsync(new Uri(“nokia-music://play/artist/?artist=green day”));
Show Gigs Around You
| Task | URI |
|---|---|
| Show Gigs Around You | nokia-music://show/gigs |
Example:
Windows.System.Launcher.LaunchUriAsync(new Uri(“nokia-music://show/gigs”));
Search for Gigs
| Task | URI |
|---|---|
| Search for Gigs | nokia-music://search/gigs/?term={term} |
Example:
Windows.System.Launcher.LaunchUriAsync(new Uri(“nokia-music://show/gigs”));
Show Curated Mixes
| Task | URI |
|---|---|
| Show Curated Mixes | nokia-music://show/mixes |
Example:
Windows.System.Launcher.LaunchUriAsync(new Uri(“nokia-music://show/mixes”));
Play a Curated Mix
| Task | URI |
|---|---|
| Play a Curated Mix | nokia-music://play/mix/?id={id} |
Example:
Windows.System.Launcher.LaunchUriAsync(new Uri(“nokia-music://play/mix/?id=18523926”));
Show Product Details (e.g. Album)
| Task | URI |
|---|---|
| Show Product Details (e.g. Album) | nokia-music://show/product/?id={id} |
Example:
Windows.System.Launcher.LaunchUriAsync(new Uri(“nokia-music://show/product/?id=36100035”));


Contents
R2d2rigo - Article format
Hello,
I think it would be better to reformat the "Nokia Music app-to-app protocol" to include the example code in a third table column and merge all of the information in one table.
Cheers.r2d2rigo 12:32, 16 November 2012 (EET)
Chintandave er - Chintandave er - Thanks for comment.
Hi, Thanks for suggestion.
Actually If I do so, table will become too large and cant fit into the screen. Anyway, thanks for advice.
Chintan Dave.Chintandave er 12:40, 16 November 2012 (EET)
Symbianyucca - the prorocol Should not be used, unless you do check first
Basically, you should add section here, in which you explain that the protocol should not be used in a device which is not Nokia device, this is due the fact that the application handling teh protocol should not be present if the device is non-Nokia one.
alsoonly few of the protocol functions are actually usable without using the Nokia Music Store specific information, to which you would need to use the Nokia Music API: http://www.developer.nokia.com/Resources/Library/Lumia/#!nokia-music-api.html
And if you are using this API, then you should use the launchers part: http://www.developer.nokia.com/Resources/Library/Lumia/#!nokia-music-api/nokia-music-launchers.html
basically there is nice API for the task, and using the protocol directly just adds possibilities for an error.symbianyucca 13:28, 18 November 2012 (EET)
Chintandave er - @Symbianyucca - Thanks for advice
If you haven't noticed my note template in this article then it is clearly saying that this works Nokia Lumia Devices only. Though I am adding this to ArticleMetaData -> dependencies.
I think we do not need to include Nokia Music API Reference to use this App-to-app protocol according to Build Session. But yeah if we want to use Launcher Task then we need to include ref. related to Nokia Music using NuGet tools in visual studio. You can find the ref PPT in See Also Section above in my article.
Yes. Launcher Task is nice but I was thinking to write article on this "Launcher Task" seperately and then adding link this article. For now , I have already added link of Launcher Task in See Also section above (if you didnt notice it yet).
After watching session of Nokia employee Steve on Nokia Music API on BUILD, Launcher Task of Nokia Music API will call this app protocol only at the end. So He showed first app to app protocol demo and converted it to Task. So I think App to app protocol works fine everytime like Tasks.
One thing to add, there is one Webfallback API, which works in other windows phone which do not have support for Nokia music app and redirect it to Web site of Nokia music rather than app. But for that we need to write such code separately by checking that device is nokia or not.
Chintan Dave.Chintandave er 19:59, 18 November 2012 (EET)
Hamishwillee - Review/feedback
Hi Chintan
Odd, I thought I'd commented on this, but clearly not.
I tend to agree with Symbianyucca here. If this would me I would
Your article though!
Regards
Hamishhamishwillee 06:46, 7 December 2012 (EET)
Hamishwillee - Subedited
I tidied the English in the introduction a little and added the tip that you can use the launchers as well (and why). Its probably not as strong a warning as Jukka would like, but it is accurate.hamishwillee 08:20, 18 December 2012 (EET)