Launchers related to MarketPlace in Windows Phone

In this post we will discuss three important launchers related to Windows Phone Market Place

  • MarketPlaceHubTask launcher
  • MarketPlaceReviewTask launcher
  • MarketPlaceDetailTask launcher

MarketPlaceHubTask launcher

This is used to launch Windows Phone Market Place client application. You can launch market place client application along with music content as below,


MarketplaceHubTask marketplaceHubTask = new MarketplaceHubTask();
marketplaceHubTask.ContentType = MarketplaceContentType.Music;
marketplaceHubTask.Show();

You can set content type of the search either as Application or Music. MarketPlaceContentType is defined as below,

clip_image002

Market place client application will be launched as below,

clip_image003

MarketPlaceReviewTask launcher

This is used to launch market place client application with review page. Market place application review page can be launched as below,



MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask();
marketplaceReviewTask.Show();

It will ask user confirmation for Submit or Cancel. It will ask user confirmation for Submit or Cancel. After selecting submit option user will be redirected to review page of market place application.

MarketPlaceDetailTask launcher

This is used to launch market place client application with details page of specified application. You need to pass unique content identifier of application to get detail page of the application from market place. If you don’t set unique content identifier then detail page of current application will be launched in windows phone market place client application.

You can launch detail page of current application as below,


MarketplaceDetailTask marketplaceDetailTask = new MarketplaceDetailTask();
marketplaceDetailTask.ContentType = MarketplaceContentType.Applications;
marketplaceDetailTask.Show();

You can launch detail page of a specific application by passing content identifier.

These are three important launchers for market place client application and you may use them frequently in your application. I hope this post is useful. Thanks for reading.

WebBrowserTask and MediaPlayerLauncher in Windows Phone

In this post, we will see WebBrowserTask launcher and MediaPlayer launcher.

WebBrowserTask launcher launches web browser application and display specified URL. This is defined as below,

image

You can set target URL either as string or as Uri. User will be asked for the confirmation. You can navigate to a URL as below,



WebBrowserTask webBrowserTask = new WebBrowserTask();
webBrowserTask.Uri = new Uri("http://debugmode.net", UriKind.Absolute);
webBrowserTask.Show();

On running you will be navigated to given URL as below,

image

MediaPlayerLauncher is used to launch media player application and play the video from specified URL. This class is defined as below,

image

You can set desired controls of media player to be shown to user. Available media player controls are as below.

image

If you want to show more than one control to the user then you need to append them using OR operator and set them as value of control property.

image

You can also specify location of the media file in MediaLocationType property. MediaLocationType takes one of three values.

 

image

 

Install represents application installation directory, Data represents isolated storage and None value need to be set for external media.

You can play media with file from isolated storage as below,



MediaPlayerLauncher mediaPlayerLauncher = new MediaPlayerLauncher();

mediaPlayerLauncher.Media = new Uri("SongVideo.wmv", UriKind.Relative);
mediaPlayerLauncher.Location = MediaLocationType.Data;
mediaPlayerLauncher.Controls = MediaPlaybackControls.Pause |
MediaPlaybackControls.Stop|
MediaPlaybackControls.FastForward;
mediaPlayerLauncher.Orientation = MediaPlayerOrientation.Landscape;

mediaPlayerLauncher.Show();

In this way you can work with MediaPlayerLauncher.

In this post we discussed on WebBrowserTask and MediaPlayerLauncher. You may need to call these native applications from your app. I hope this post is useful. Thanks for reading.