8 – 10 March 2011 | Dubai, UAE
Zeddy IskandarConsultantInfusion
Tips and Tricks on Windows Phone 7 Development
SESSION CODE: IAT202
2
About meinfusionite, mvp, mobile app dev…
3
Agenda
Necessary ToolkitsLearning & Sample CodesGPS Emulator & Bing GeoCodeMarketplace Tips
4
NECESSARY TOOLKITSdon‘t reinvent the wheel
5
The Noun Project (Free Iconography)
http://thenounproject.com
6
Windows Phone Toolkit
AutoCompleteBox ContextMenu DatePicker GestureService/GestureListener ListPicker LongListSelector
Page Transitions PerformanceProgressBar TiltEffect TimePicker ToggleSwitch WrapPanel
http://bit.ly/WP7-PhoneToolkit
7
WinPhone Toolkit Demo
8
Coding4Fun Toolkit
About Prompt Input Prompt Progress Overlay Round Button
Round Toggle Button Memory Counter TimeSpan Picker Toast Prompt
http://bit.ly/WP7-Coding4Fun
9
Code4Fun Toolkit Demo
10
LEARNINGfloat before you swim
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 http://bit.ly/WP7-31days
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
12
Tombstoningvoid Application_Launching (object sender, LaunchingEventArgs e) { } void Application_Activated (object sender, ActivatedEventArgs e) { } void Application_Deactivated (object sender, DeactivatedEventArgs e) { } void Application_Closing (object sender, ClosingEventArgs e) { }
Source: CodeGuru
13
Providing Trial
using Microsoft.Phone.Marketplace;
var li = new LicenseInformation();
if ( !li.IsTrial() ) { // paid users only} else { // trial users }
Source: CodeGuru
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
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
Choosers – they return Data!
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
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; }
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));
18
GPS EMULATORdon‘t waste your device’s battery
19
Reusable Coordinate Retriever
#define GPS_EMULATOR Comment for Real DeviceUncomment for Emulator
Call from BackgroundWorker
Returns when Coordinate is retrieved, or when TIMEOUT occurs
http://bit.ly/WP7-GPS
20
Reusable Reverse Geocoding
Returns Address object given a Latitude & Longitude pair
Call from BackgroundWorker
http://bit.ly/WP7-ReverseGeocode
21
MARKETPLACEprepare before you hit submit
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-AppCertBuild in Release ModeTest, Test, Test on Real Device before uploading .XAP
If publishing fails, you will get PDF file:Why it failsSteps to reproduce
After you fix the failure, you will need to wait another 5 days :)
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
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
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
Marketplace Artwork
Create icon from scratchGeneric 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
27
Marketplace Screenshots
Use the free Windows 7 Snippet Tool
Zoom to 100%
Disable Frame Rate Counter
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
8 – 10 March 2011 | Dubai, UAE
Complete an evaluation on CommZone and enter to win an HP laptop!
30
Q & A
http://twitter.com/zeddyiskandar
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee
the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.