CHAPTER 7 EXERCISE SOLUTIONS
Exercise 1 Solution
The short answer is that it depends. There is no rule that says you must make application bar icons that fit with the Windows Phone 7 scheme. However, if you want to make your applications as usable as possible, you should probably do so. You should also be aware that Windows Phone 7 will overlay circles over your icons automatically, so unless they fit into a 26 × 26 square in the middle of the bitmap, it's possible that they will be obscured. If you really want to customize the application bar completely, you might have to use your own custom control instead.
Exercise 2 Solution
- You can use EmailComposeTask to send an email message, and you might also want EmailAddressChooserTask to get an email address to send to if you're sending to an existing contact.
- You can use CameraCaptureTask to take a photo.
- You can use MediaPlayerLauncher to play a video, or you can embed a video in your page.
- Vibration doesn't require launchers or choosers.
- SIP changes aren't achieved using launchers or choosers.
Exercise 3 Solution
Tombstoning is the process by which an application is suspended while a launcher or chooser operates. Users may choose not to complete the required operation, but when the application resumes, it will be as if the launcher or chooser has completed. You must be aware of this and never require user input. You must also persist any state that you require as state is not maintained after tombstoning.