WP7 Launchers

Launchers are a set of APIs that Windows Phone applications can use to enable common tasks such as making a phone call or sending an email. Unlike Choosers, Launchers do not return a value back to the calling application.

Using Launchers in Your Application.

The Launcher APIs are belong to the Microsoft.Phone.Tasks namespace. You need to add a using directive for this namespace to the PhoneApplicationPage class file. All of the Launcher APIs function in a similar manner. First, you create an instance of the Launcher class you wish to use. Next, you set properties of the Launcher object that will determine the behavior of the task application when it is invoked. For example, you can specify a phone number that will be displayed when the Phone application launches. Finally, you call the Launcher’s Show method to launch the task application.It is important to note that when you use a Launcher, a separate application is launched to complete the task. For example, the EmailComposeTask invokes the Messaging application. When the separate application is launched, your application is deactivated and is no longer running. After completing the task, the user can return to your application, at which point it is reactivated.

Classes

CameraCaptureTask
Allows an application to launch the Camera application. Use this to allow users to take a photo from your application.ChooserBase<TTaskEventArgs>
The base class from which all choosers are derived. This class exposes a common function for showing the choosers and an event for handling the chooser result.EmailAddressChooserTask
Allows an application to launch the Contacts application. Use this to obtain the email address of a contact selected by the user.EmailComposeTask
Allows an application to launch the email application with a new message displayed. Use this to allow users to send email from your application.EmailResult
Represents an email address returned from a call to the Show method of a EmailAddressChooserTask object.MarketplaceDetailTask
Allows an application to launch the Windows Phone Marketplace client application and display the details page for the specified product.MarketplaceHubTask
Allows an application to launch the Windows Phone Marketplace client application.MarketplaceLauncher
This Windows Phone Marketplace Launcher API is deprecated. It will not be supported in future releases. Please use the new Windows Phone Marketplace APIs, MarketplaceDetailTask, MarketplaceHubTask, MarketplaceReviewTask, and MarketplaceSearchTask.MarketplaceReviewTask
Allows an application to launch the Windows Phone Marketplace client application and display the review page for the specified product.MarketplaceSearchTask
Allows an application to launch the Windows Phone Marketplace client application and display the search results from the specified search terms.MediaPlayerLauncher
Allows an application to launch the media player.PhoneCallTask
Allows an application to launch the Phone application. Use this to allow users to make a phone call from your application.PhoneNumberChooserTask
Allows an application to launch the Contacts application. Use this to obtain the phone number of a contact selected by the user.PhoneNumberResult
Represents a phone number returned from a call to the Show method of a PhoneNumberChooserTask object.PhotoChooserTask
Allows an application to launch the Photo Chooser application. Use this to allow users to select a photo.PhotoResult
Represents a photo returned from a call to the Show method of a PhotoChooserTask object or a CameraCaptureTask object.SaveEmailAddressTask
Allows an application to launch the contacts application. Use this to allow users to save an email address from your application to a new or existing contact.SavePhoneNumberTask
Allows an application to launch the contacts application. Use this to allow users to save a phone number from your application to a new or existing contact.SearchTask
Allows an application to launch the Web Search application.SmsComposeTask
Launches the Messaging application with a new SMS message displayed.TaskEventArgs
The EventArgs used by the Completed event for all Choosers.WebBrowserTask
Allows an application to launch the Web browser application.

EmailComposeTask

EmailComposeTask launches the Email application which displays a new email message. You can optionally specify recipients, a message subject, and a message body that are prepopulated in the new message. The message is not sent until it is initiated by the user.

MediaPlayerLauncher

MediaPlayerLauncher launches the Media Player application and plays the media file you specify. Media files are stored in isolated storage when saved to disk by the application and are stored in the application’s installation directory if they are bundled into the applications .xap file. You must specify one of these locations using the MediaLocationType enumeration. You can optionally specify that one or more controls should be shown by the Media Player using bitwise OR combinations of the MediaPlaybackControls values.

SearchTask

SMSComposeTask

SmsComposeTask launches the Messaging application which displays a new SMS message. You can optionally specify recipients and a message body that are prepopulated in the new message. The message is not sent until it is initiated by the user.