320 likes | 523 Vues
APP-823T. Windows Phone multitasking. Peter Torr - http :// blogs.msdn.com/ptorr Program Manager Microsoft Corporation. Key Takeaways for Windows Phone Mango. Broad set of multitasking features. Balances user experience with phone health. Familiar .NET programming model.
E N D
APP-823T Windows Phone multitasking Peter Torr - http://blogs.msdn.com/ptorr Program Manager Microsoft Corporation
Key Takeaways for Windows Phone Mango Broad set of multitasking features Balances user experience with phone health Familiar .NET programming model
Windows Phone Multitasking Block Diagram Alarms & Reminders File Transfers Background Audio Periodic Execution Fast App Switching Built-in services 3rd-party services Resource Management
Windows Phone Harmony Delightful and Responsive UX Battery-Friendly Health Never Regret Installing Apps Network-Aware Integrated Experiences Hardened Services UX
Multitasking and Phone Health New OS services Processing on demand Balance foreground and background Align with system and user activity Monitor resource usage
demo Fast Application Switching
Fast Application Switching Support Keeps user in control Compile and test for Mango Suspends application threads Load or refresh state* OS Compatible with 7.0 apps Reattach resources* * Only if needed.
Application Lifecycle Reload / refresh state only if needed Activated Running Tombstoned Dormant Deactivated Application is resident in memory; system detaches resources and pauses threads Save state but do not discard it
demo + code Alarms and Reminders
Alarms and Reminders - Overview Same UX as built-in alarms and reminders Deep link back into the application Efficient implementation based on OS services
demo + code Background Transfer Service
Background Transfer Service - Limits 1 2 3 4 5
Background Transfer Service - Limits 20 MB 20 MB Unlimited 100 MB 5 MB
Background Transfer Service - Overview Balances functionality with phone health and user cost Simplifies download management in apps Efficient implementation based on OS services Persists across reboots
demo + code Live Tiles
Live Tiles - Overview Pin multiple tiles to Start New flip animation with additional content Update three ways: push, schedule, or local API
demo Background Agents
End-to-End Architecture Developer Application OS MyApp Solution MyApp.dll MyApp Project Single App UX WMAppManifest Logic System Services ISO Store Cloud MyAppAgent Project Logic Different Processes MyAppAgent.dll
code Background Agents
Background Agents – Basic Functionality Allowed Restricted • Tile updates • Toasts • Location • Networking • Storage • Most framework APIs • Microphone • Camera • Sensors • Graphics • Audio • All XNA libraries
Background Agents – Two Flavours Periodic Agent Resource-Intensive Agent • Runs every 30 minutes • Any network connection • Runs for 25 seconds • Used for location, data sync, etc. • Runs on external power • Non-cell network connection • Runs for 10 mins, recurring • Used for daily tasks, large data syncs, etc. ...when battery level is > 20% and battery saver is not on ...when battery level is > 90%
Background Agents - Overview Separate resource-constrained process Managed by the OS to maintain phone health User stays in control via system settings Familiar .NET programming model
demo Background Audio
End-to-End Architecture 20/30 West End Girls Pet Shop Boys MusicApp.dll UX Zune Playback Cloud ISO Store All playback logic lives in the agent! Logic MusicAgent.dll
code Background Audio
Background Audio Playback - Overview HTML 5 Audio Playback in Internet Explorer Track-based playback for standard formats Buffer-based playback for custom formats Guaranteed resources for continuous playback
Recap for Windows Phone Mango Broad set of multitasking features Balances user experience with phone health Familiar .NET programming model
Health UX
© 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.
thank you Feedback and questions http://forums.dev.windows.com Session feedbackhttp://bldw.in/SessionFeedback
© 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.