The choosers and launchers APIs allow an application to integrate with common operating system tasks such as taking a picture, finding an address or a contact, making a call, or saving a ring tone. This hands-on lab walks you through the launchers available on Windows Phone.
The launchers and choosers framework enables Windows Phone applications to provide common functions such as placing phone calls, sending emails, and taking pictures for their users.
The Windows Phone application model isolates every application in its own work area for both execution (including memory isolation) and file storage. Windows Phone applications are not able to directly access common information stores such as the contacts list or to directly invoke other applications such as phoning or messaging. To support scenarios requiring common tasks such as phoning or messaging, the Windows Phone provides a set of launcher and chooser APIs that enables applications to access these useful phone features indirectly. The launcher and chooser APIs invoke distinct built-in applications that replace the currently running application. The launchers and choosers framework provides the end user with a seamless experience while masking the application switching that occurs in the background.
The framework components are as follows:
Below is the complete list of launchers that Windows Phone 7 Codenamed “Mango” supports:
While it is always a good practice to think about application tombstoning during Window Phone development, one should consider tombstoning even more seriously when dealing with launchers and choosers.
When does an application get tombstoned?
Generally speaking, an application gets tombstoned [that is, it is placed in the back stack] when a user forward navigates away from it. While there are a few exceptions to this general rule, applications in the background may be tombstoned at any time if the system requires additional resources to carry out the current foreground activity.
An application will not be automatically tombstoned when it launches an experience that feels to the user like an extension of the original application. These experiences are native flows that help the user complete some task, like choosing a photo. Avoiding tombstoning in these cases ensures a smooth flow between the application and the experience it has called [for example, no delay between choosing a photo and returning to the application that uses it].
Below is the list of native experiences that, when invoked, do not trigger an automatic tombstone in the calling application:
There are three scenarios in which an application in the background will immediately be tombstoned:
All the above information regarding tombstoning is true for Windows® Phone 7.0. On Windows® Phone 7.1 launchers and choosers never initiate tombstoning, but it may be initiated nonetheless if the device requires additional resources. For more information on the new 7.1 application execution model please refer to documentation.
Upon completion of this lab, you will:
The following is required to complete this hands-on lab:
This hands-on lab is comprised of the following exercises:
Estimated time to complete this lab: 30 minutes.