First Look at Launchers for Windows Phone


In this article we will look at the various Launchers available for Windows Phone. Launchers are nothing but enablers to perform common task enabling to provide a common user experience across the windows phone platform. This does not return any data.

The launchers available for Windows Phone are as follows



  • Bing Maps Direction Task
  • Bing Maps Task
  • Connection Settings Task
  • Email Compose Task
  • Marketplace Detail Task
  • Marketplace Hub Task
  • Marketplace Review Task
  • Marketplace Search Task
  • Media Player Launcher
  • Phone Call Task
  • Search Task
  • Share Link Task
  • Share Status Task
  • SMS Compose Task
  • Web Browser Task
In order to use these launchers, we have to reference the library

using Microsot.Phone.Tasks;


We will look at the following launchers and its usage

  • Phone Call Task
  • SMS Compose Task
  • Bing Map Task
In the earlier blog post, we had created a simple “ContactApp” application. We will add these launchers to them.

Phone Call Task

This task enables the users to make a phone call. From the “ContactApp”, we will see how a user can place a call when the user double taps the contact.

We will write the below code for the double tap event of the list item


From the above code, we see that the “Display Name” which is used to display name of the calling person and “Phone Number” which is the number to call properties of the “PhoneCallTask” class has to be set. After which the “Show” method is invoked to launch the task.

 The UI for the same is as shown below


Now when we click on the call button, the call is placed as shown below



SMS Compose Task

The SMS Compose Task helps enables the users to send SMS for the application. From the “ContactApp”, we will see how a user can Send SMS when clicking on the contacts

We will write a below code for a context menu item click event on “Send SMS” as show below


The UI for the context menu click is as shown below


Now in the new page “SendSMS.xaml”, we will add a “Send” button. For click event we will write the below code as shown



From the above code we see that we will set the “To” which holds the number of the receiver and “Body” which has the text message properties of the “SMSComposeTask” class. Then call the “Show” method to invoke the task.

The UI will look as shown below


On click of the “Send” Button, the below is seen


When we click on the above highlighted button,the sms will be send.

Bing Map Task

The Bing Map Task enables to launch the bing maps. For the “ContactApp”, we will see how to locate the contacts location.

We will write the below code for the context menu item’s “Search Location in Maps” click event 


From the above code, we see that the “Search Term” which accepts the searchable text on the map and the “ZoomLevel” which can be used to for setting zoom level properties of the “BingMapsTask” class has to be set. Then call the “Show” method to invoke the task.

The UI for the searched content, in this searched the location of contact “Los Angeles” is as shown below.


To read about other Launchers in Windows Phone, check out http://msdn.microsoft.com/en-us/library/ff769550(v=vs.92).aspx

Hope this was helpful. Please do drop your comments.


Comments

Popular posts from this blog

Jesus - God Thinks of you.

ASP.NET 4.0 Feature - URL Routing

Tips on JQuery Intellisense in VS 2008