Windows Phone 8 Application Foundation

40

description

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. - PowerPoint PPT Presentation

Transcript of Windows Phone 8 Application Foundation

Page 1: Windows Phone 8 Application Foundation
Page 2: Windows Phone 8 Application Foundation

Windows Phone 8Application FoundationThomas FennelSenior Program Manager Lead2-204

Page 3: Windows Phone 8 Application Foundation

App LifecyclePerformanceMultitaskingPhone IntegrationEnterprise

Agenda slide

Click icon to add picture

Page 4: Windows Phone 8 Application Foundation

Application Lifecycle

Page 5: Windows Phone 8 Application Foundation

Application Lifecycle – Launching & Closing

not running closingrunningLaunching

Running in Background

launching

Launching

Closing

Page 6: Windows Phone 8 Application Foundation

Application Lifecycle – Activated & Deactivated

running

deactivated

suspended

activated

tombstoned

Activate

d

Deactivated

Page 7: Windows Phone 8 Application Foundation

Application Lifecycle EventsPhoneApplicationService

LaunchingActivatedDeactivatedClosing

Page 8: Windows Phone 8 Application Foundation

Application Lifecycle Demo

Page 9: Windows Phone 8 Application Foundation

Performance

Page 10: Windows Phone 8 Application Foundation

Application PerformanceStartup is the chance to lose usersWe invested heavily in startup time for Windows Phone 8Facebook app reduced from 12 seconds to 4 seconds

Why?Execution environment improvementsCompile in the cloud Core CLR improvements

No work from developers – free (as in beer)!

Page 11: Windows Phone 8 Application Foundation

Compile in the cloudMoving to CoreCLR brings Native Image Generator (NGEN)Code generation is expensive and time consuming on deviceCompile in the cloud NGEN’s your code when you submitSubmit your XAP to marketplace just as you always haveCode 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 versionOriginal 7.1 apps is kept for download to 7.1 devices

Page 12: Windows Phone 8 Application Foundation

Performance is as much an art as it is a science

Users care about perceived performance not benchmarksKey Performance IndicatorsHow 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

Page 13: Windows Phone 8 Application Foundation

Resuming applicationsIn 7.5 we allowed apps to be in a suspended stateThis 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

Page 14: Windows Phone 8 Application Foundation

Multitasking

Page 15: Windows Phone 8 Application Foundation

Multitasking on Windows Phone

Windows Phone 7Tombstoning

Run Under Lock

Notifications

Windows Phone 7.5Fast App Switching

Background Audio Playback

Generic Background Agents

Windows Phone 8VoIP

Continuous Background Execution

Fast App Resume

Evolution of Multitasking

Page 16: Windows Phone 8 Application Foundation

What is Fast App Resume?

Page 17: Windows Phone 8 Application Foundation

Fast App Resume UX

Resume previous experience for Primary tilewhen previously launched via Primary tile

Start fresh for Deep Linkswhen previously launched via Primary tile or a different Deep Link

Don’t block OnBackKeyPressthis is how users close your app

Page 18: Windows Phone 8 Application Foundation

Fast App Resume Basics

“Replace” is the default activation policyOpt-in to “Resume" via manifest setting<DefaultTask Name="_default" NavigationPage="MainPage.xaml" ActivationPolicy="Resume" />

Apps are still suspended or tombstoned

Page 19: Windows Phone 8 Application Foundation

Fast App Resume In The Real World

Page 20: Windows Phone 8 Application Foundation

Backstack – Do nothing

Page 21: Windows Phone 8 Application Foundation

Backstack – Clear page stack

Page 22: Windows Phone 8 Application Foundation

Reset: Clear the page stack

Backstack – Clear page stack

Page 23: Windows Phone 8 Application Foundation

Backstack - Cancel navigation

Page 24: Windows Phone 8 Application Foundation

Reset: Cancel navigation

Backstack - Cancel navigation

Page 25: Windows Phone 8 Application Foundation

Fast App Resume Code Demo

Page 26: Windows Phone 8 Application Foundation

Fast Resume TakeawayMain Tile: Resume!Deep Links: Clear the back stackOnBackKeyPress: Do not block Test relaunch: between primary tile and deep linksDon’t forget Tombstoning!

Page 27: Windows Phone 8 Application Foundation

Integrating with Windows Phone

Page 28: Windows Phone 8 Application Foundation

App Launching with URI and File AssociationURI AssociationFirst 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 FacebookAllows for browser integrationAllows for rich integration between apps

File AssociationRegister your own file type

Go to Sean McKenna’s Session (2-212) Friday @ 2PM

Page 29: Windows Phone 8 Application Foundation

Uri Associations…

fandango:ShowTheater?ID=RegalIssaquah9

Page 30: Windows Phone 8 Application Foundation

Tile Templates and Tile SizesWindows Phone 8 supports three Tile templatesFlip – 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

Page 31: Windows Phone 8 Application Foundation

Your app can show detailed status on the lock screenYour app can show quick status (icon and count)Your app can update the background image

Lock Screen on Windows Phone 8

Page 32: Windows Phone 8 Application Foundation

Lock: dynamic wallpapers – how it worksActivate 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

Page 33: Windows Phone 8 Application Foundation

Enterprise

Page 34: Windows Phone 8 Application Foundation

EnterpriseDevice managementEnroll device with management server (inTune etc)Set policies to be applied and updatedAutomatically keep apps updated

App deploymentNo need to deploy apps into Windows Phone StoreDeploy using the technology that makes sense for your companyApps signed by you are deployable via web, email or app

Page 35: Windows Phone 8 Application Foundation

Why Enterprise deployment matters to youFlexible deployment allows for considerable benefits Testing appsUses company hub to distribute latest builds of your app to you testersBeta apps in the marketplace work great but not suited to daily buildsEmail & SD card deployment allow for simplicity

With great power comes great responsibility…

Page 36: Windows Phone 8 Application Foundation

SummarySignificant application runtime improvementsFast App Resume helps every app – go do it!Multitasking improvements enable key new app experiencesLive Tiles provide significant user experience advancesLockscreen and notifications allows you to build deeper integrationEnterprise deployment allows for considerable flexibility

Page 37: Windows Phone 8 Application Foundation

Wednesday Thursday Friday09:00 Keynote Keynote PH 2-222

WP NetworkingPeter TorrNorth 13409:30

10:00

10:30 PH 2-211Using Native in your appsTim LavertySouth 102

PH 2-216WP Dev Best PracticesStefan WickNorth 134

11:00

11:30 PH 2-201Intro to WP DevSam GeorgeNorth 134

PH 2-202WP Design for DevCorrina BlackNorth 135

PH 2-206WP Tiles, Lock, NotificationsThomas FennelNorth 13412:00 PH 2-205

WP: MVVM in PracticeMatthias ShapiroNorth 13412:30

13:0013:3014:00 PH 2-204

WP App FoundationThomas FennelNorth 134

PH 2-215Build for Both Win 8 and WP8Matt HidingerNorth 134

PH 2-212WP Cross App CommsSean McKennaSouth 222

PH 2-220WP Map AppsMike O’MalleyNorth 13414:30

15:0015:30 PH 2-210

WP Camera appBerthier LemieuxNorth 134

PH 2-213Maximize RevenueBernardo ZamoraNorth 135

PH 2-219Story of Nokia Music from WP to Win 8Matthew CooperNorth 13416:00

16:3017:00 PH 2-207

WP Game BasicsJoao RazaSouth 304

PH 2-208WP UI in XAMLShawn OsterNorth 134

PH 2-208WP MiddlewareJC CimetiereNorth 132

PH 2-221WP Low MemoryAndrew WhitechapelNorth 135

PH 2-218WP Contest PanelPanelNorth 12317:30

Page 38: Windows Phone 8 Application Foundation

Developer resourcesMSDN DOCS

Design http://aka.ms/wp8devdesignDevelo

phttp://aka.ms/wp8devdoc

Test http://aka.ms/wp8testingPublish http://aka.ms/wp8publishi

ngSamples

http://aka.ms/wp8samples

TRAINING CONTENT

Absolute Beginners http://wpdev.ms/beginvidsJump Start http://aka.ms/wp8js

Design Boot Camp http://aka.ms/wp8designbootcamp

Training Kit http://aka.ms/wp8hol

NEWS & UPDATES

Portal http://dev.windowsphone.comBlog http://wpdev.ms/developerblogChannel

9http://wpdev.ms/insidewp

Twitter http:/twitter.com/wpdev

Page 39: Windows Phone 8 Application Foundation

Evaluate this sessionScan this QR code to evaluate this session and be automatically entered in a drawing to win a prize!

Page 40: Windows Phone 8 Application Foundation

© 2013 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.