windows and windows phone application model universal apps what’s new in windows phone 8.1 3
Post on 29-Jan-2016
224 Views
Preview:
TRANSCRIPT
Windows Phone and Window 8.1 App ModelShawn Henry
WIN-B354
Windows and Windows Phone Application ModelUniversal AppsWhat’s new in Windows Phone 8.1
Agenda
3
DeploymentExecutionStorageNavigationOS IntegrationNotifications
What is an App Model?
4
App ModelConvergence
Platform convergence is a journey…Windows Phone
7.xWindows Phone 8.0
Windows Phone 8.1
Convergence Begins with IE
• WP 7.5 shipped with IE9
• Same IE codebase as Windows
• Same JavaScript engine as Windows
Converged Core OS
• Common NT kernel, file system and core networking, secure boot, BitLocker
Developer Platform
• Partial API convergence
• Native Code (C++) and DirectX
• IE10
Windows 7 Windows 8.0 Windows 8.1
Converged Dev Platform
• More code and skillset reuse
Aligning the Stores
• Shared dev registration
• Shared entitlement
Common Core Platform
• Proximity & Location frameworks
• Security & identity
• Background Tasks
Windows developer platform
Windows API Set
Graphics Audio Media
Networking File System Input
Commerce
Sensors
.NET CLRWindows Runtime
DirectX(C++)
SilverlightXAML
(C# | VB)
Windows XAML
(C# | VB | C++)
WinJS(HTML + JS)
App Model Services
Navigation
Packaging
Contracts
Background
Store
Push
Roaming
Legend
Windows Phone Only
Windows OnlyWindows + Windows Phone
Windows Kernel
App Data Backup
Demo
Application Lifecycle
Application Lifecycle
Running
SuspendedNotRunningResuming
SuspendingActivated
Demo
Converging the app experience on PhoneApps always resume8.1 apps don’t close on backEasy and delightful App Switcher
Primary Tile
Resume your app as the user left if rather than starting it fresh
Start the app fresh if a long time has elapsed since the user last access it
When in doubt, provide the user with a choice
Avoid stranding users coming from Deep Links
Phone Back button takes users where they came from
Resume Behavior
Windows Phone 8 enabled:Run well on 512Mb devicesRun great on >512MbGuaranteed User Experience
Windows Phone 8.1 goes further to make the experience more fluid
Scale across the ecosystem
In Windows Phone 8 apps got a predefined memory cap
150 Mb on 512Mb devices300 Mb on 1gig450 Mb on 2gig
Worked well but could be overly conservative94% of apps ≤ 150MB, 86% o ≤ 100MB, 80% ≤ 80MB, 70% ≤ 60MB
Result:Apps were tombstoned that didn’t need to be on low end devicesUser experience suffered since app always restarted
Working well on 512Mb
System monitors how much memory your app is using over timeAdjusts memory cap for app based on this data
ResultMore apps stay in memory512 Mb – some apps resume>1Gig – nearly all apps resume
Dynamic Memory Estimation
Enhanced Multitasking
Trigger based executionCentered around BackgroundTasksResponds to Triggers and Conditions
One trigger per task, multiple conditions
Applications must request access to run in the background
Basic TriggersTrigger Usage
System TriggerUserPresent , UserAway, SessionConnected, TimeZoneChange, NetworkStateChange, InternetAvailable, ServicingComplete
Run code on system events
TimeTrigger Data synchronization
MaintenanceTrigger Perform maintenance work on AC power
Demo
Push to wake a taskCreate a push channel as you do todayCreate a trigger with channel in the constructorWhenever a push notification comes in your apps task runs
Why should you care?Process the push notification *before* showing the toastYour app can run without ever showing a toast
Update your tileUpdate the action center
Geofencing
APIs to enable geofencingLocation triggers
Up to 1000 geofences
Geofencing experienceApp registers for a number of geo-coordinate anchors with a radius around that point
When a user enters that geofence, the app is triggered and app execution can happen
Geofence notifications can be received in the background by a background taskAdd a GeofenceGeocircle circle = new Geocircle(circleCenter, radius: 25.5);
Geofence geofence = new Geofence("LinconSquareStore", circle);
GeofenceMonitor.Current.Geofences.Add(geofence);
Register a background TaskBackgroundTaskBuilder builder = new BackgroundTaskBuilder(); builder.SetTrigger(new LocationTrigger(LocationTriggerType.Geofence));
Geofencing
Bluetooth RFComm, Bluetooth LE and Sensors while not in foreground
Based on existing and new WinRT Bluetooth APIs
New Triggers:GattCharacteristicNotificationTriggerDeviceChangeTriggerDeviceUpdateTriggerRfcommConnectionTrigger
Bluetooth and Sensors
All background tasks have CPU, memory and network quotas
Quotas are based on actual CPU usage instead of wall clock time limits only
Wall-clock CPU quota will also be enforced (at least 30 secs)
Memory quota scales based on device capabilitiesTimeTrigger will have a 30 min floor on Phone
Call RequestAccessAsync() to get your full quota!
Resource constraints
Native Background Task functionality is available from Silverlight 8.1 applications
Background Agents are hosted on top of WinRT Background infrastructure
Windows Phone Silverlight 8.1 Apps
Notifications and Push
One Microsoft Push ServiceWindows Notification Service (WNS)Works with Windows and Windows PhoneExisting Phone push notifications now run over WNS with no changeSingle client on device that works with WNS & MPNS
Result: All push notifications (old & new) work better and more battery efficient
Toast notificationsCommon data formatDevice specific visualization
Action CenterProvides fresh and relevant information while preserving the ability to glance + goUsers can dismiss notification groups or allNotifications can be added via toast or silentlyApps can also update or remove notifications
Common Live TilesSame template mechanism for Windows & PhoneMore flexibility to get users more engaged
Deployment and Storage
App packaging + deployment
Same format for Windows & Phone (APPX)Split out resources into separate packagesData efficient download
AppX Package
720p
Manifest(s)
1080p SpanishGermanItalianFrenchEnglishWVGA
DLLs
App backup & roamingApp Data roaming with Windows apps
Start Screen BackupTile metadata and layout is backed up to OneDrive daily
App Data BackupApp decides what data gets backed up to OneDrive
Windows Device (PFN = 123)
Roaming Local Temp
Windows Phone (PFN = 123)
Roaming Local Temp
Roaming
100kb
100kb
Device A
Device B
Enables user-driven data sharing between appsSame programming model across Windows User experience scales to deviceApps can freely share content, with no limitations on content typeOptimized to ensure works on low end devices
Application data sharing with Contracts
Demo
Apps run better on all your devicesWNS and Action CenterEnhanced multitaskingEnhanced deployment optionsBackup & Roaming
Summary
Breakout Sessions
WIN-B351 Enterprise App Deployment for Windows and Windows Phone
WIN-B352 PUSH: How to Build and Take Advantage of Push-Enabled Apps in an Enterprise/IT Environment
WIN-B353 App Deployment: Scaling from PCs to Low-End Devices
Related content
Find Me Later At: Ask The Experts
Windows 10http://aka.ms/trywin10
Stop by the Windows Booth to sign up for the Windows Insider Program to get a FREE Windows 10 T-shirt, whiles supplies last!
Windows Springboardwindows.com/itpro
Windows Enterprisewindows.com/enterprise
Windows ResourcesMicrosoft Desktop Optimization Package (MDOP)microsoft.com/mdop
Desktop Virtualization (DV)microsoft.com/dv
Windows To Gomicrosoft.com/windows/wtg
Internet Explorer TechNet http://technet.microsoft.com/ie
Resources
Learning
Microsoft Certification & Training Resources
www.microsoft.com/learning
Developer Network
http://developer.microsoft.com
TechNet
Resources for IT Professionals
http://microsoft.com/technet
Sessions on Demand
http://channel9.msdn.com/Events/TechEd
TechEd Mobile app for session evaluations is currently offline
SUBMIT YOUR TECHED EVALUATIONSFill out an evaluation via
CommNet Station/PC: Schedule Builder
LogIn: europe.msteched.com/catalog
We value your feedback!
© 2014 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.
top related