Download presentation
Presentation is loading. Please wait.
1
Windows Phone 7 advanced services
CO6025
2
Introduction Launchers and Choosers Accelerometer GPS and Maps
A set of classes for interacting with underlying phone features/resources, e.g. Camera, , SMS etc. Accelerometer GPS and Maps
3
Launchers and Choosers
There is no low level access to phone features Everything is through managed code All features are accessed using phone UI, though data can be communicated from an app. A launcher starts a phone feature A chooser allows you to select an item from phone store The application is tombstoned with some tasks so make sure you save application state
4
List of Tasks Following features are accessible Photos Media Email
Phone Contacts SMS Search Marketplace
5
Photo access PhotoChooserTask CameraCaptureTask
Show() method launches media library browser When photo is selected it returns to your application Completed event fires and returns a stream containing the picture CameraCaptureTask Show method starts the camera When a photo is taken AND accepted it returns to application Completed event fires returning the filename of the taken photo and a stream containing the picture.
6
Media library access MediaPlayerLauncher MediaLibrary MediaElement
Show() method launches the phones media player Can only play the item set in the Media property Item must be from within the application or in the applications own Isolated Storage space. MediaLibrary Can access the contents of the library (e.g. photos, music and video) MediaElement Music and video can be played using the MediaElement class MediaElement works inside the application (i.e. it is not a launcher) Can play local media files too
7
Email access EmailAddressChooserTask EmailComposeTask
Show() method launches a list of contacts for whom you have addresses Completed event returns an address if one is selected ComposeTask Show() method launches the system in the phone pre-populated with the details you provide. There is NO Completed event
8
Phone access PhoneNumberChooserTask PhoneCallTask
Show() method launches a list of contacts for whom you have phone numbers Completed event returns the chosen phone number PhoneCallTask Show() method dials the number you provide in the PhoneNumber property There is no completed event
9
Contact access SaveEmailAddressTask SavePhoneNumberTask
Show() method launches the Contact page and allows you to save the provided address Can be added to an existing contact or a new contact can be created Completed handler returns an error flag. SavePhoneNumberTask As with Save AddressTask, but allows the provided PhoneNumber to be save.
10
SMS access SmsComposeTask
Show() method launches the SMS messaging system prepopulated with the provided To and Body properties. The user can click the send button or navigate back. The To and Body fields can be edited before sending.
11
Search access SearchTask
Show() method performs search with the provided SearchQuery property Uses normal Bing search syntax Demo uses ‘domain: in the query to restrict search to the tutorial domain Lots of other query filters possible
12
Marketplace access MarketplaceHubTask MarketplaceSearchTask
Show() method launches full MarketPlace site for the provided ContentType (either Music or Applications) MarketplaceSearchTask Show() method searches ContentType for provided SearchTerms MarketplaceDetailTask Show() method displays detail page for the provided App Id. If App Id is null provides details for current app. Useful for allowing a paid update MarketplaceReviewTask Show() method displays reviews page for current App.
13
Accelerometer Accelerometer class provides access to built in accelerometer Start and Stop method ReadingChanged event returns X, Y and Z acceleration values Values in range -2 to +2 Value of 1 equivalent to normal gravity Application processes values as required
14
GPS GeoCoordinateWatcher Start and Stop methods
StatusChanged event handler PositionChanged event handler Position contains TimeStamp Latitude and Longitude Bearing Speed Horizontal and Vertical accuracy estimate
15
Bing Map control Drop Map onto design surface
By default provides a browse-able interface CredentialProvider required to get rid of watermark message Sign up with Bing for apiKey! Center property can be linked to GPS to provide position tracking Methods provided for positioning other UI elements in correct geo-coordinate location. E.g. LocationToViewportPoint Events to help update UI E.g. ViewChangeOnFrame
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.