280 likes | 488 Views
Liven up your WP7 Apps with s weet “Mango” s auce. Jaime Rodriguez Microsoft. @ jaimerodriguez. http://blogs.msdn.com/jaimer. jaimer@microsoft.com. A to-do app…. . Tidy . DEMO . http://bit.ly/WP7AppsDoMore. “Apps are smarter on Windows Phone.. Where the same apps Do more”
E N D
Liven up your WP7 Apps with sweet “Mango” sauce Jaime Rodriguez Microsoft @jaimerodriguez http://blogs.msdn.com/jaimer jaimer@microsoft.com
Tidy DEMO
http://bit.ly/WP7AppsDoMore “Apps are smarter on Windows Phone.. Where the same apps Do more” Joe Belfiore, VP
Local database Your App Custom Data Context App Objects • SQL CE 4 • Sandboxed • LINQ to SQL System.Data.Linq Object Materialization Identity Management Change Tracking Update Processing Microsoft.Phone.Data.Internal Core ADO.NET (System.Data) SQL CE DB SQLCE ADO.NET Provider (System.Data.SqlServerCe)
SQL CE CODE WALK-THROUGH
Lessons and tips • MS recommends code first approach • Design object model • Apply Attributes • SQL Metal works too • Leverage background threads • Keep changes small (aka save often) • Let SQL do the work
Multi-tasking design principles Delightful and Responsive UX Battery Friendly Health Never Regret App Install Network Conscience UX Integrated Feel Hardened Services
Multi-tasking Options • Background Transfer Service • Background Audio • Background Agents • Periodic • On Idle • Alarms and Reminders
Background Transfer Service • Start in foreground, complete in background, even if app is closed • Queue (of 5) persists across reboots • Single service for many apps, FIFO • Download ~20 MB ( > over Wi-Fi) • Upload Size ~4 MB (limit to come) • Transfers to Isolated Storage
Background Transfer CODE WALK-THROUGH
Notifications • Time-based, on-phone notifications • Supports Alerts & Reminders • Persist across reboots • Adheres to user settings • Consistent with phone UX
Alarms vs Reminders? • Alarms • Reminders • Rich information • Integrates with other reminders • Snooze and Dismiss • Launch app • Follows the phones global settings • Modal • Snooze and Dismiss • Sound customization • No app invocation • No stacking
Reminders CODE WALK-THROUGH
Live Tile improvements • Local Tile APIs • Full control of ALL properties • Multiple tiles per app • Create,Update/Delete/Query • Launches direct to Uri Secondary Tile Launches local news page Application Tile Launches main app experience Secondary Tile Launches world news page
Live Tiles – Local Tile API (2) • Back of tile updates • Full control of all properties when your app is in the foreground or background • Content, Title, Background • Flips from front to back at random interval • Smart logic to make flips asynchronous Content Content string is bigger Background Title Title
Live tiles CODE WALK-THROUGH
Generic Agents Periodic Agents • Occurrence • Every 30 min • Duration • ~15 seconds • Constraints • <= 5 MB Memory • <=10% CPU On Idle Agents • Occurrence • External power, non-cell network • Duration • 10 minutes • Constraints • <= 5MB Memory All of this is requirements can change before RTM, but should not change too much
Background Agent Functionality Allowed Restricted • Tiles • Toast • Location • Network • R/W ISO store • Sockets • Most framework APIs • Display UI • XNA libraries • Microphone and Camera • Sensors • Play audio(may only use background audio APIs)
Background Agents CODE WALK-THROUGH
Background Tips & Lessons • Renew often • Known issues in beta build • SQL CE & memory • Debugger (prompts & memory) • IsEnabled flag • One agent for multiple tasks
A “Mango” to-do app.. • Local database + LINQ to SQL • Alarms and Reminders • Live tiles (secondary tiles) • Navigation • Background processing • FAS, File transfer, Agents
Take on the challenge!! • Windows Phone “Mango” Training Kit http://bit.ly/WP7MangoKit • Tidy Labs: • SQL, • Tiles • BTS • Background Agents • Other labs • Photo fun • SL + XNA • Choosers & Launchers • Push
Thank You! Q&A jaimer@microsoft.com @jaimerodriguez
© 2008 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.