Windows-8.1

Launchers and choosers – Marketplace Tasks in Windows phone app

This is the fourth blog post of this series in which I am going to talk about different Marketplace tasks in Windows phone app.

In this post I shall be discussing about four different tasks

1. MarketplaceReviewTask

2. MarketplaceDetailTask

3. MarketplaceHubTask

4. MarketplaceSearchTask

 

1. First create a new project having the name Marketplacetasks.

 


 

2. Before going further add the following Namespace required for the above tasks in the MainPage.xaml.cs.

  MarketPlaceReview Task It is a quiet useful task and is of great importance. It launches the Windows Phone Marketplace client application which then displays the review page for your application. Create a button on the MainPage to launch the task. When we will click on this button it will take us to the review page of the application. The code for click event handler of this button is given below.  

 

MarketPlaceDetail Task

It launches the Windows Phone Marketplace client application and shows the details page for a product specified by the unique identifier you provide. Content identifier is the product ID from the manifest. You can set another external ID or if left empty, then it should use the current app product ID.

The default ContentType is ContentType.Applications so there is no need to change it if you’re bringing up your Application details page.

Suppose I want to add the link of my other application in my current app. I will set the content identifier to the product Id of the application which I want to add.

For example – Create a button on the MainPage to launch the task. Set the content identifier as specified. When we will click on the button it will open the Marketplace page of the application.

The code for click event handler of this button is given below.

    MarketPlaceSearch Task It launches the Windows Phone Marketplace client application which then shows the search results based on search terms you provide. Note that you can search by SearchTerms(keyword) and ContentType. For example I want to search for a specific app having the name Tilemaker I will set the search term to Tilemaker. Create a button on the MainPage to launch the task. The code for click event handler of this button is given below.  

 

MarketPlaceHub Task

It launches the Windows Phone Marketplace client application. Set the ContentType property to a value from the MarketplaceContentType enumeration in order to launch the hub to a particular type of content:

MarketplaceContentType.Music – music content

MarketplaceContentType.Applications – application content

To demonstrate it we shall create a button on the MainPage. When we will click on it the marketplace will get open on the phone.

The code for click event handler of this button is given below.



 

I hope this post will be helpful to you. You can download the full project source file from the link given below.

Download Full Project file MarketplaceTasks.zip

Chetan Gulati

Currently am doing B TECH in IT from Delhi Technological University. App development is my passion. Believe in quality rather than quantity.

Read more:
How to create your first Windows Phone app
How to change the App name and Tile name of your Windows phone app
Data binding in Windows Phone app – One way binding
Close