×
Namespaces

Variants
Actions
(Difference between revisions)

Nokia MixRadio app-to-app protocol for Windows Phone 8

From Nokia Developer Wiki
Jump to: navigation, search
kiran10182 (Talk | contribs)
m (Kiran10182 -)
hamishwillee (Talk | contribs)
m (Hamishwillee - Fix up all text for rebrand to MixRadio)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Windows Phone]][[Category:Windows Phone 8]][[Category:Nokia Music API]][[Category:Code Snippet]]
+
[[Category:Nokia MixRadio API on Windows Phone]][[Category:Base/System on Windows Phone]][[Category:XAML]][[Category:Code Snippet]][[Category:Windows Phone 8]]
{{Abstract|This article explains how to integrate our application with Nokia Music services and elements using [[::Category:Nokia Music API|Nokia Music API]] for [[::Category:Windows Phone|Windows Phone]]. This article lists the URI schemes that can be used to launch Nokia Music and do other things with it.}}
+
{{Abstract|This article explains how to access Nokia MixRadio services using the Nokia MixRadio app's published app-to-app protocol.}}
 
+
{{Note|This is a community entry in the [[Windows Phone 8 Wiki Competition 2012Q4]].}}
+
 
+
 
{{ArticleMetaData <!-- v1.2 -->
 
{{ArticleMetaData <!-- v1.2 -->
 
|sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] -->
 
|sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] -->
Line 9: Line 6:
 
|devices= Nokia Lumia devices,
 
|devices= Nokia Lumia devices,
 
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Qt SDK 1.1.4]) -->
 
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Qt SDK 1.1.4]) -->
|platform= Windows Phone 8 only
+
|dependencies= Nokia Lumia device only, Nokia MixRadio
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
+
|dependencies= Nokia Lumia device only, Nokia Music
+
 
|signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
 
|signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
 
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
|keywords= URI, Launcher, LaunchUriAsync
 
 
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 
|translated-by= <!-- [[User:XXXX]] -->
 
|translated-by= <!-- [[User:XXXX]] -->
Line 28: Line 22:
  
 
{{SeeAlso|
 
{{SeeAlso|
* [http://bit.ly/ZS1w6p Nokia Music API]
+
* [http://bit.ly/ZS1w6p Nokia MixRadio API]
* [http://bit.ly/ZS2i3k Nokia Music App-to-app Protocol PPT]
+
* [http://bit.ly/ZS2i3k Nokia MixRadio App-to-app Protocol PPT]
 
* [http://bit.ly/Wb7PTn URI Scheme of Built in app WP8]
 
* [http://bit.ly/Wb7PTn URI Scheme of Built in app WP8]
 
}}
 
}}
  
 
== Introduction ==
 
== Introduction ==
[[::Category:Windows Phone 8|Windows Phone 8]] platform supports app-to-app protocol for 3rd party applications. It means that we can launch one app from another app by using Launching API for Windows Phone. This article describes how to use Nokia Music app-to-app protocol for [[::Category:Windows Phone 8|Windows Phone 8]] in our application to avail Nokia Music service. The Nokia Music Windows Phone API provides Launchers that allow easy integration with Nokia Music. Using this URI Scheme, we can launch Nokia Music app, search for an artist or an album, get details of a particular song or an album, get nearest gigs etc.
+
[[:Category:Windows Phone 8|Windows Phone 8]] exposes an app-to-app protocol API for 3rd party applications. This can be used to launch the Nokia MixRadio 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 MixRadio app-to-app protocol in an application to access the Nokia MixRadio service.  
 +
 
 +
{{Tip|The protocol relies on the existence of the Nokia MixRadio app, which will not be present on non-Nokia devices. If your code may run on other devices a good approach is to use the [http://developer.nokia.com/Resources/Library/Lumia/#!nokia-mixradio-api/nokia-mixradio-launchers.html Nokia MixRadio API Launchers] - not only do these provide the common "launcher" interface, but they also provide fallback-to-web behaviour if Nokia MixRadio app is not present.}}
  
 
== What is app-to-app protocol ? ==
 
== What is app-to-app protocol ? ==
 
App-to-app protocols allow one app to launch another app with a specific URI Scheme. With [[::Category:Windows Phone 8|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.
 
App-to-app protocols allow one app to launch another app with a specific URI Scheme. With [[::Category:Windows Phone 8|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 [[::Category:Windows Phone 8|Windows Phone 8]] to use various services of Nokia Music. To call app-to-app protocol, we need to use [http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh701480.aspx Launcher.LaunchUriAsync(Uri)] method and pass URI schema in it. For example, to launch Nokia Music app from other app, call {{Icode|Launcher.LaunchUriAsync(Uri)}} with URI Schema {{Icode|nokia-music://}}
+
But here we will see how to use Nokia MixRadio API Launchers for [[::Category:Windows Phone 8|Windows Phone 8]] to use various services of Nokia MixRadio . To call app-to-app protocol, we need to use [http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh701480.aspx Launcher.LaunchUriAsync(Uri)] method and pass URI schema in it. For example, to launch Nokia MixRadio app from other app, call {{Icode|Launcher.LaunchUriAsync(Uri)}} with URI Schema {{Icode|nokia-music://}}
  
 
<code csharp>
 
<code csharp>
Line 45: Line 41:
 
</code>
 
</code>
  
{{Note|This code cant be tested on [[::Category:Windows Phone 8|Windows Phone 8]] Emulator due to lack of Nokia Music app but can test only on Nokia Lumia [[::Category:Windows Phone 8|Windows Phone 8]] device. If you want to test this code in Emulator, You need .xap file of Nokia music to install Nokia Music app manually.}}
+
{{Note|This code cant be tested on [[::Category:Windows Phone 8|Windows Phone 8]] Emulator due to lack of Nokia MixRadio app but can test only on Nokia Lumia [[::Category:Windows Phone 8|Windows Phone 8]] device. If you want to test this code in Emulator, You need .xap file of Nokia MixRadio to install Nokia MixRadio app manually.}}
  
== Nokia Music app-to-app protocol ==  
+
== Nokia MixRadio app-to-app protocol ==  
Here are the list of Nokia Music app-to-app protocol with example.
+
Here are the list of Nokia MixRadio app-to-app protocol with example.
  
 
=== Launch App ===  
 
=== Launch App ===  
Line 179: Line 175:
  
 
== See also ==
 
== See also ==
* [http://www.developer.nokia.com/Resources/Library/Lumia/#!nokia-music-api.html Nokia Music API]
+
* [http://developer.nokia.com/Resources/Library/Lumia/#!nokia-mixradio-api.html Nokia MixRadio API]
* [http://www.developer.nokia.com/Resources/Library/Lumia/#!nokia-music-api/nokia-music-launchers.html Nokia Music Launchers]
+
* [http://developer.nokia.com/Resources/Library/Lumia/#!nokia-mixradio-api/nokia-mixradio-launchers.html Nokia MixRadio Launchers]

Latest revision as of 02:38, 22 November 2013

This article explains how to access Nokia MixRadio services using the Nokia MixRadio app's published app-to-app protocol.

SignpostIcon XAML 40.png
WP Metro Icon WP8.png
Article Metadata
Tested with
Devices(s): Nokia Lumia devices,
Compatibility
Platform(s):
Windows Phone 8
Dependencies: Nokia Lumia device only, Nokia MixRadio
Article
Created: chintandave_er (15 Nov 2012)
Last edited: hamishwillee (22 Nov 2013)

Contents

[edit] Introduction

Windows Phone 8 exposes an app-to-app protocol API for 3rd party applications. This can be used to launch the Nokia MixRadio 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 MixRadio app-to-app protocol in an application to access the Nokia MixRadio service.

Tip.pngTip: The protocol relies on the existence of the Nokia MixRadio app, which will not be present on non-Nokia devices. If your code may run on other devices a good approach is to use the Nokia MixRadio API Launchers - not only do these provide the common "launcher" interface, but they also provide fallback-to-web behaviour if Nokia MixRadio app is not present.

[edit] 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 MixRadio API Launchers for Windows Phone 8 to use various services of Nokia MixRadio . 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 MixRadio app from other app, call Launcher.LaunchUriAsync(Uri) with URI Schema nokia-music://

Windows.System.Launcher.LaunchUriAsync(new Uri(“nokia-music://”));

Note.pngNote: This code cant be tested on Windows Phone 8 Emulator due to lack of Nokia MixRadio app but can test only on Nokia Lumia Windows Phone 8 device. If you want to test this code in Emulator, You need .xap file of Nokia MixRadio to install Nokia MixRadio app manually.

[edit] Nokia MixRadio app-to-app protocol

Here are the list of Nokia MixRadio app-to-app protocol with example.

[edit] Launch App

Task URI
Launch App nokia-music://

Example:

Windows.System.Launcher.LaunchUriAsync(new Uri(“nokia-music://”));

[edit] 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”));

[edit] 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”));

[edit] 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”));


[edit] 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”));

[edit] 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”));

[edit] Show Curated Mixes

Task URI
Show Curated Mixes nokia-music://show/mixes


Example:

Windows.System.Launcher.LaunchUriAsync(new Uri(“nokia-music://show/mixes”));


[edit] 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”));


[edit] 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”));

[edit] See also

This page was last modified on 22 November 2013, at 02:38.
238 page views in the last 30 days.