Windows Phone 8 Application Model Windows Azure 11/7/2018 Windows Phone 8 Application Model Andrew Clinick Group Program Manager Windows Phone © 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.
Agenda Running your app Multitasking Phone Integration Enterprise
Execution Model Don’t break it Build 2012 11/7/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.
Application Performance Startup is *the* chance to lose users 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 Dual core >1ghz is a wonderful thing
Introducing: Compile in the cloud Moving to CoreCLR brings Native Image Generator (NGEN) 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 did in 7.x Code in XAP is NGEN’d and the XAP updated with compiled code What about my existing app? 7.5 apps are NGEN’d so Windows Phone 8 gets compiled version Original 7.5 apps is kept for download to 7.5 devices
Performance is much an art as it is 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
Introducing: Fast App Resume Allows your app to always resume no matter where it’s launched from: App list Live Tile Toast Deep link If your app is in the back stack then we will resume it If it’s not then we will launch a new instance
Demo
Enabling FAR in your app Not enabled by default. Why? Protect your user experience Ensure that apps don’t break Very simple to enable New ActivationPolicy attribute on DefaultTask <DefaultTask Name="_default" NavigationPage="MainPage.xaml" ActivationPolicy="Resume"/> Go to Session 2-017 (Thursday 8:30 am!) for more details on this
Multitasking
Background Location tracking apps Location tracking apps are pretty limited if they can’t keep running Enables your app to continue running in the background *if* it is actively tracking location
How to enable <DefaultTask Name="_default" NavigationPage="Views/Home.xaml"> <BackgroundExecution> <ExecutionType Name="LocationTracking" /> </BackgroundExecution> </DefaultTask> Go to Session 2-017 (Thursday 8:30 am!) for more details on this
Demo Background location
Maps Bing Maps control from Windows Phone OS 7.1 is still supported, but deprecated The new Maps controls use technology supplied by Nokia New features: Vector-based for faster rendering Four cartographic map modes Light and dark color modes Display landmark and pedestrian features
Integrating with the phone
VOIP Provide platform for *all* VOIP providers Integrate with phone incoming call notification Enable Video calls Enable background audio calls Enhanced push notification support
Demo Skype
App Deep Linking and Sharing Custom Schemes First introduced @ PDC 1996 (the PDC with Steve Jobs!) Ability to register a custom URIs for your app skype:andrewclinick – starts a conversation with me fb://profile/706864318 – brings up my profile Allows for browser integration Allows for rich integration between apps File Types Register your own file type Goto 3-044 (Friday 12:45) for deep dive on this
Make a Skype call Peter Bergman Skype:PeterBergman Loved the Purple Onion Peter Bergman Skype:PeterBergman
Data
Data Storage Structured Data SD Card SQL Server and L2S still supported Lots of feedback that you were looking for alternatives Worked closely with SQLite SQLite is available TODAY for Windows Phone SD Card Read Write to the SD card
Device Data Apps can create contacts visible in the People hub Read/write access to app’s own contacts Read-only access to other contacts if allowed by owning app (same as Mango) create_task(ContactStore::CreateOrOpenAsync()) .then([] (ContactStore^ store) -> IAsyncAction^ { StoredContact^ george = ref new StoredContact(store); george->Description = "George Mallaley"; george->GivenName = "George"; george->FamilyName = "Mallaley"; auto props = create_task(george->GetPropertiesAsync()).get(); props->Insert(KnownContactProperties::Email, "gm@contoso.com"); return george->SaveAsync(); });
Live Apps
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 25
Lock Screen on Windows Phone 8 You can register your app as a lock screen provider, which enables: User can select your app to show detailed status on the lock screen Can select your app as one of the five apps to show quick status (icon and count) Can select your app as the lock screen background image provider 11/7/2018
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 Shell APIs ShellSetWallpaper to use a new image ShellWallpaperSchedule to download a single image from the internet on a specific interval (e.g., 30 mins, 1 hour, etc.) ShellWallpaperFolderSchedule to cycle through a set of image in app’s isolated storage (e.g., a photo slideshow) based on number of views of the lock screen
Demo Facebook
Enterprise
Enterprise Device management App deployment Enroll device with management server (inTune etc) 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 Go to 2-014 (Friday @ 2:30) for more Enterprise info
Demo Company Hub
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 “sneakernet” simplicity
Summary Significant application runtime improvements Fast App Resume helps every app 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