When using the initiator or selector, make sure that the referenceMicrosoft. Phone. TasksNamespace.
What is a starter?
The initiator description can be described as a "Trigger and forget" mechanism. Use them to send emails, view maps, and take photos.
- Emailcomposetask-Allow users to send emails through their email accounts.
- Marketplacedetailtask-Start Windows Phone marketplace to allow users to view a specific product.
- Marketplacehubtask-Start Windows Phone marketplace, which allows you to display a certain type of applications by default.Program.
- Marketplacereviewtask-Take the user to the comment page of the current program in Windows Phone marketplace.
- Marketplacesearchtask-Start the Windows Phone marketplace search result. The result is from the search item you enter (or the one you set ).
- Mediaplayerlauncher-Start the built-in media player and play the specified media file.
- Phonecalltask-Start the phone program and display the phone number and name. The call is only made after the user clicks "call.
- Searchtask-You can regard this as a way to provide Bing search functions in your program.
- Smscomposetask-Start the Information Program and display the function of sending information to users. You can specify the message recipient and information content, but only the user can send the message.
- Webbrowsertask-Open the web browser and jump to the specified URL.
Enable the starter
After setting any attributes, you must use the show () method to display them to users.
What is a selector?
Selectors are a little more complex than starters because they need to bring data back into the program, while starters only allow users to complete a task.
- Cameracapturetask-Provides users with the function of taking photos directly in the program.
- Emailaddresschoosertask-In the program, you can select an email address from the contact.
- Phonenumberchoosertask-In the program, you can select a phone number from the contact.
- Photochoosertask-In the program, you can select a photo from the device.
Use Selector
After setting the attributes of the selector, you need to show the show Method to the user. You can use the show method in the selector. However, an event handler must be created after the user makes the selection. Otherwise, the selected data cannot be captured. (Create an event handler to obtain and use data in the Program)
Note: cameras are not actually usable during testing in simulators.