400 likes | 546 Views
Windows Phone 8 Application Foundation. Thomas Fennel Senior Program Manager Lead 2-204. Agenda slide. App Lifecycle Performance Multitasking Phone Integration Enterprise. Application Lifecycle. Application Lifecycle – Launching & Closing. n ot running. C losing. Launching. r unning.
E N D
Windows Phone 8Application Foundation Thomas Fennel Senior Program Manager Lead 2-204
Agenda slide • App Lifecycle • Performance • Multitasking • Phone Integration • Enterprise
Application Lifecycle – Launching & Closing not running Closing Launching running launching Launching closing Running in Background
Application Lifecycle – Activated & Deactivated • running Activated Deactivated • activated • deactivated tombstoned • suspended
Application Lifecycle Events • PhoneApplicationService Launching Activated Deactivated Closing
Application Performance • Startup is the chance to lose users • We invested heavily in startup time for Windows Phone 8 • Facebook app reduced from 12 seconds to 4 seconds • Why? • Execution environment improvements • Compile in the cloud • Core CLR improvements • No work from developers – free (as in beer)!
Compile in the cloud • Moving to CoreCLR brings Native Image Generator (NGEN) • Code generation is expensive and time consuming on device • Compile in the cloud NGEN’s your code when you submit • Submit your XAP to marketplace just as you always have • Code in XAP is NGEN’d and the XAP updated with compiled code • What about my existing app? • 7.1/7.8 apps are NGEN’d so Windows Phone 8 gets compiled version • Original 7.1 apps is kept for download to 7.1 devices
Performance is as much an art as it is a science • Users care about perceived performance not benchmarks • Key Performance Indicators • How often you use the app really impacts your feel for performance • 4 seconds is still too long for the app you use all the time • Perception is impacted by context switching • Even if your app starts super fast if the user has to remember where they were it slows them down
Resuming applications • In 7.5 we allowed apps to be in a suspended state • This is great but… • Only get the benefit if you tap back or use the task switcher we resumed the apps • Task switcher isn’t a feature that every user will use
Multitasking on Windows Phone • Windows Phone 7 • Tombstoning • Run Under Lock • Notifications • Windows Phone 7.5 • Fast App Switching • Background Audio Playback • Generic Background Agents • Windows Phone 8 • VoIP • Continuous Background Execution • Fast App Resume Evolution of Multitasking
Fast App Resume UX • Resume previous experience for Primary tile • when previously launched via Primary tile • Start fresh for Deep Links • when previously launched via Primary tile or a different Deep Link • Don’t block OnBackKeyPress • this is how users close your app
Fast App Resume Basics • “Replace” is the default activation policy • Opt-in to “Resume" via manifest setting • <DefaultTaskName="_default"NavigationPage="MainPage.xaml"ActivationPolicy="Resume"/> • Apps are still suspended or tombstoned
Backstack – Clear page stack Reset: Clear the page stack
Backstack - Cancel navigation Reset: Cancel navigation
Fast Resume Takeaway • Main Tile: Resume! • Deep Links: Clear the back stack • OnBackKeyPress: Do not block • Test relaunch: between primary tile and deep links • Don’t forget Tombstoning!
App Launching with URI and File Association • URI Association • First introduced @ PDC 1996 (the PDC with Steve Jobs!) • Ability to register a custom URIs for your app • skype:Call?UserID=thomasfennel– starts a conversation with me in Skype • fb:Profile?UserName=thomasfennel– brings up my profile in Facebook • Allows for browser integration • Allows for rich integration between apps • File Association • Register your own file type • Go to Sean McKenna’s Session (2-212) Friday @ 2PM
Uri Associations… fandango:ShowTheater?ID=RegalIssaquah9
Tile Templates and Tile Sizes • Windows Phone 8 supports three Tile templates • Flip – flips from front to back (similar to the WP 7.1 Tile template) • Iconic – clean iconic layout designed to reflect Windows Phone design principles • Cycle – cycles through up to nine images 30
Lock Screen on Windows Phone 8 • Your app can show detailed status on the lock screen • Your app can show quick status (icon and count) • Your app can update the background image
Lock: dynamic wallpapers – how it works • Activate via Lock+Wallpaper CPL or within app • Update the wallpaper • When the app is running • Using a background agent • New WinRT APIs • Go to my session (2-206) Thursday @ 11.30AM
Enterprise • Device management • Enroll device with management server (inTuneetc) • Set policies to be applied and updated • Automatically keep apps updated • App deployment • No need to deploy apps into Windows Phone Store • Deploy using the technology that makes sense for your company • Apps signed by you are deployable via web, email or app
Why Enterprise deployment matters to you • Flexible deployment allows for considerable benefits • Testing apps • Uses company hub to distribute latest builds of your app to you testers • Beta apps in the marketplace work great but not suited to daily builds • Email & SD card deployment allow for simplicity • With great power comes great responsibility…
Summary • Significant application runtime improvements • Fast App Resume helps every app – go do it! • Multitasking improvements enable key new app experiences • Live Tiles provide significant user experience advances • Lockscreen and notifications allows you to build deeper integration • Enterprise deployment allows for considerable flexibility
Developer resources NEWS & UPDATES MSDN DOCS TRAINING CONTENT
Required Slide *delete this box when your slide is finalized Your MS Tag will be inserted here during the final scrub. Evaluate this session • Scan this QR codeto evaluate this session and be automatically entered in a drawing to win a prize!