1 / 20

Yochay Kiriaty Microsoft

Windows Phone Platform Integration. Yochay Kiriaty Microsoft. @ yochayk. http://windowsteamblog.com /. yochayk@microsoft.com. http://learningwindowsphone . com. Agenda. Love and hate tombstoning What is tombstone and why you should care? The basic Advance

remedy
Download Presentation

Yochay Kiriaty Microsoft

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Windows Phone Platform Integration Yochay Kiriaty Microsoft @yochayk http://windowsteamblog.com/ yochayk@microsoft.com

  2. http://learningwindowsphone.com

  3. Agenda • Love and hate tombstoning • What is tombstone and why you should care? • The basic • Advance • Choosers and Launchersand Tombstone • What, why, and how • Tombstoning

  4. Basic Application Lifecycle

  5. Tombstone Application lifecycle User is back where he` left off • Press Start • Open toast • Lock screen Load state to continue where she left off Save state for later use The application’s process is killed (in most cases)*

  6. App Management • The Windows Phone execution model is designed to provide end users with a fast, responsive experience • Only one 3rd-party application can run in the foreground • System terminates your application when user navigates away • App is Tombstoned when user “navigates” away • System saves some state information then terminates the app • When user navigates back to the application, system restarts it and passes state information back to the client • Developer must write code to respond to lifecycle events • Save and restore state • Maintain illusion that the application is running continuously

  7. Lifecycle Events • Application_Launching • When the application is launching • Not fired when the application is reactivated • Application_Activated • When the application is activated • Not fired when the application is first launched • Application_Deactivated • When the application is deactivated • Not fired when the application is closing • Application_Closing • When the application is closing • Not fired when the application is deactivated

  8. Application Lifecycle 1 User ‘Backs’ past first page App Running Closing event Launching event Start User invokes chooser or launcher, or presses Start to launch another app Deactivated event

  9. Application Lifecycle 2 User completes chooser or launcher. Or user navigates back from other app to reach your app Restored app instance App Running Deactivated event Activated event New app instance User presses Start and launches your application App Running Launching event

  10. Application Lifecycle Demo

  11. Tombstone and Controls • Pivot • Use SelectedIndex • Must used in the page (control) loaded event • Pano • DefaultItem • But…. • Scrollbar • VerticalOffset • Map Control • Zoom levels and other transforms • Picture viewer or any other control • manipulation.

  12. Tombstone & Controls Demo

  13. Tombstone and Resources • Camera, Video, Mic • Release on Page OnNavigatingFrom (or earlier) • Location • Deactivated (ideal onOnNavigatingFrom) • Remember warm-up time • Sensors • Stop on Page OnNavigatingFrom

  14. Advance Topics • Application’s load time • Lunching , Existing, Deceived, Activated: all in just 10 sec • Defer loading and use background thread • Serlilization frameworks and times • Make sure you read this • Optimize save state • Per page • Global (MVVM)

  15. Launchers and Chooser • Common tasks used by users • Camera, SMS, Contacts, Marketplace, etc… • Tombstone the application • Some have relaxed tombstoning policy • PhotoChooserTask • CameraCaptureTask • MediaPlayerLauncher • EmailAddressChooserTask • PhoneNumberChooserTask • Game Invite – Used in XNA Games • Gamer Card – Used in XNA Games

  16. Launchers, Choosers And Tombstone Demo

  17. Summary • Tombstone is part of your Windows Phone application – deal with it! • Understand method call order • Do not rely on classes or page constructors • Check global objects before using • Defer work as much as possible • Be smart when saving your state • Be aware of startup and shutdown times • Delight your users by working smart with controls, UI, and resources

  18. Feedback Thank You for attending today’s Tech.Days Online Conference. Today’s Online Conference will be recorded. It will be made available on-demand very soon. Your Feedback Matters! Please complete the online evaluation form which will be emailed to you.

More Related