Namespaces
Variants
Actions
(Difference between revisions)

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

Jump to: navigation, search
m (Kiran10182 -)
m (Hamishwillee - Subedit introduction and add appropriate warning)
Line 1: Line 1:
 
[[Category:Windows Phone]][[Category:Windows Phone 8]][[Category:Nokia Music API]][[Category:Code Snippet]]
 
[[Category:Windows Phone]][[Category:Windows Phone 8]][[Category:Nokia Music API]][[Category:Code Snippet]]
{{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 Music services using the Nokia Music app's published app-to-app protocol.}}
 
+
 
{{Note|This is a community entry in the [[Windows Phone 8 Wiki Competition 2012Q4]].}}  
 
{{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 34: Line 32:
  
 
== 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 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.  
 +
 
 +
{{Tip|The protocol relies on the existence of the Nokia Music 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://www.developer.nokia.com/Resources/Library/Lumia/#!nokia-music-apis/nokia-music-launchers.html Nokia Music API Launchers] - not only do these provide the common "launcher" interface, but they also provide fallback-to-web behaviour if Nokia Music app is not present.}}
  
 
== What is app-to-app protocol ? ==
 
== What is app-to-app protocol ? ==

Revision as of 09:19, 18 December 2012

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

Note.png
Note: This is a community entry in the Windows Phone 8 Wiki Competition 2012Q4.
Article Metadata

Tested with
Devices(s): Nokia Lumia devices,

Compatibility
Platform(s): Windows Phone 8 only
Dependencies: Nokia Lumia device only, Nokia Music

Article
Keywords: URI, Launcher, LaunchUriAsync
Created: chintandave_er (15 Nov 2012)
Last edited: hamishwillee (18 Dec 2012)

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.

Tip.png
Tip: The protocol relies on the existence of the Nokia Music 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 Music API Launchers - not only do these provide the common "launcher" interface, but they also provide fallback-to-web behaviour if Nokia Music app is not present.

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://”));
Note.png
Note: This code cant be tested on Windows Phone 8 Emulator due to lack of Nokia Music 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 music to install Nokia Music app manually.

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”));

See also

319 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved