This is the session IAT202 Tips and Tricks on Windows Phone 7 Development that I presented during Microsoft TechEd Middle-East conference on 10th March 2011.
11. 11 31 Days of Windows Phone Page Navigation The Back Button Paradigm Device Orientation System Theming Application Bar Launchers Choosers Debugger Tips Input Scope (on-screen Keyboard) Accelerometer Vibration Controller Location Services Tombstoning Isolated Storage Panorama Control Pivot Control WebBrowser Control Push Notification API Map Control Apps vs. Games Trial Versions of Your App Embedding Fonts Talking to Existing APIs (like Twitter) Sharing Your App With Other Developers Windows Phone Marketplace Advertising SDK Animations Gestures Charting http://bit.ly/WP7-31days
13. 13 Providing Trial using Microsoft.Phone.Marketplace; var li = new LicenseInformation(); if ( !li.IsTrial() ) { // paid users only } else { // trial users } Source: CodeGuru
14. 14 Launchers – Common Phone Tasks EmailComposeTask MarketplaceDetailTask – takes the user to a specific product MarketplaceHubTask – show a category of apps (or all) MarketplaceReviewTask – review the current application MarketplaceSearchTask – search the marketplace MediaPlayerLauncher – plays the media file
15. 15 Launchers – Common Phone Tasks (2) PhoneCallTask – displays phone number and name. User needs to press Call manually SearchTask – Bing search SMSComposeTask – specify recipients and message body, but user needs to press Send manually WebBrowserTask –navigates to specified URL
16. 16 Choosers – they return Data! var cct = new CameraCaptureTask(); cct.Completed += cct_Completed; cct.Show(); void cct_Completed(.., PhotoResult e) { var bmp = new BitmapImage(); bmp.SetSource(e.ChosenPhoto); someImage.Source = bmp; } Handle the returned data well CameraCaptureTask –take a picture EmailAddressChooserTask – select email address from contacts PhoneNumberChooserTask –select phone number from contacts PhotoChooserTask – select a photo from album
17. 17 Haptic Feedback (vibrate) indicate button is pressed something failed new content received (new tweets, etc) game feedback (explosion, etc.) var vc = VibrateController.Default; vc.Start(TimeSpan.FromMilliseconds(100));
19. 19 Reusable Coordinate Retriever #define GPS_EMULATOR Comment for Real Device Uncomment for Emulator Call from BackgroundWorker Returns when Coordinate is retrieved, or when TIMEOUT occurs http://bit.ly/WP7-GPS
20. 20 Reusable Reverse Geocoding Returns Address object given a Latitude & Longitude pair Call from BackgroundWorker http://bit.ly/WP7-ReverseGeocode
22. 22 Do it right the first time It takes 5 business days to get published, so: Read App Cert Requirements guide http://bit.ly/WP7-AppCert Build in Release Mode Test, Test, Test on RealDevice before uploading .XAP If publishing fails, you will get PDF file: Why it fails Steps to reproduce After you fix the failure, you will need to wait another 5 days :)
23. 23 Certification Status (1) Submission in Progress = You need to click the Submit button (or click it again!) to finish the submission. Ready for Testing = The app has been submitted, but hasn't been placed "in the queue" for testing. Testing in Progress = The app is in the queue and the next tester available will get to work testing it. The app will usually stay in this status until it is ready for signing or has failed certification.
24. 24 Certification Status (2) Ready for Signing = The app has passed certification and is awaiting the next signing batch so it can be published. Ready for Publishing = The app has been certified and signed, but you did not select the auto-publish option when you submitted it. You need to go into the app's detail page and publish it yourself! Published to Marketplace = The app has been through the entire process and is now "published".
25. 25 Certification Status (3) Certification Failed = The app has failed certification and you will need to change it before you submit it again. There should be a failure report that can be downloaded from the app’s detail page. (hint: The download is accessed from the Action dropdown.) None = It is unknown what this means. Apps with a status of None are sometimes delayed for several days. If your app has a status of “None” for more than 48 hours I would put in a support request.
26. 26 Marketplace Artwork Create icon from scratch Generic icon will fail your publishing status (5 days remember?) Screenshots have to be 480x800 Don’t forget the 1000x800 background image It’s used for “Featured App”, you want to make it pretty & right Don’t forget the 3 extra icons: 99x99 173x173 200x100
28. 28 Marketplace Screenshots This app deploys .XAP But to Unlocked Device! Unlocked = users with Developer Account The same .XAP can be uploaded by receiver to Marketplace For sharing internally, not externally
29. 8 – 10 March 2011 | Dubai, UAE Complete an evaluation on CommZone and enter to win an HP laptop!