SlideShare a Scribd company logo
1 of 41
demo
Apps do not get notified when
they are getting terminated
Registering for Suspend and Resume is
Easy

//Register for the Suspending event and call suspendingHandler when received
Windows.UI.WebUI.WebUIApplication.addEventListener("suspending", suspendingHandler);

//Handle the suspending event and save the current user session using WinJS sessionState
function suspendingHandler(eventArgs) {
//We are getting suspended
}
//Register for the Resuming event and call resumingHandler when received
Windows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler);
function resumingHandler(

) {

//We are getting resumed, in general do nothing
}
Registering for Suspend and Resume is
Easy

// Register for the Suspending event and call OnSuspending when received

// Handle the suspending event and save the current user session using WinJS sessionState
void async
var
//TODO: Save application state and stop any background activity
}
// Register for the Resuming event and call OnResuming when received

void
object
object
{
// We are getting resumed, in general do nothing
}
Scenario

You should:
User
Launches
App

Splash
screen
demo
Multiple per
app

System
Trigger

Leaving blank:
BackgroundTaskHost.exe

WinRT Component
Yourapp.exe

MyBackgroundTask
WinRTComponent

Create
Call Run()

BackgroundTaskHost.exe

Windows
Example
System Trigger

Register on User Login

using Windows.ApplicationModel.Background;
// Specify the trigger
IBackgroundTrigger trigger =
new SystemTrigger(SystemTriggerType.SessionConnected, false);

Create user
login trigger

Associate
trigger with
app code

// Associate app code with the trigger
BackgroundTaskBuilder taskBuilder = new BackgroundTaskBuilder();
taskBuilder.TaskEntryPoint = “MyApp.Background.RegisterForUserLogin";
taskBuilder.SetTrigger(trigger);
taskBuilder.Name = “OnUserPresent";
Register
// Register the task for background execution
trigger
IBackgroundTaskRegistration taskRegistration =
taskBuilder.Register();
Example
System Trigger

Background execution on User
Login

using Windows.ApplicationModel.Background;
namespace MyApp.Background
{
public sealed class RegisterForUserLogin: IBackgroundTask
{
public void Run(IBackgroundTaskInstance taskInstance)
{
// Your app code
}
}
}
Trigger

Lock screen

Description

UserPresent

X

User becomes present (touches screen, keyboard, mouse)

UserAway

X

User becomes absent or system idle timer expires.

SessionConnected

X

User logs in.

ControlChannelReset

X

Control channel is reset

InternetAvailable

Internet becomes available

NetworkStateChange

Change in connection state (cost, network)

ServicingComplete

App update has finished

OnlineIdConnectedStateChange

Microsoft account connected to logon account has changed.

LockScreenApplicationAdded

An app has been added to the lock screen

LockScreenApplicationRemoved

An app has been removed from the lock screen

TimeZoneChange

The system time zone has changed

SmsReceived

SMS message received by mobile broadband device.

BackgroundWorkCostChange

X

the cost of background work changes
CPU resource quota
Lock screen app

Non-lock screen app

Refresh period
demo
System Condition

Description

InternetAvailable/InternetNotAvailable

Availability of Internet connectivity

UserPresent / UserNotPresent

Presence of user

SessionConnected / SessionDisconnected

User’s logged-on status

FreeNetworkAvailable

Availability of free internet

BackgroundWorkCostNotHigh

Only when on AC
var t = new SystemTrigger(SystemTriggerType.NetworkStateChange, false);
var btb = new BackgroundTaskBuilder() {
TaskEntryPoint = "BGComponent.BTC",
Name = "NetworkState Changed" };
btb.SetTrigger(t);
SystemCondition c = new SystemCondition(SystemConditionType.UserPresent);
btb.AddCondition(c);
BackgroundTaskRegistration task = btb.Register();
Completed
Yourapp.exe

Progress

MyBackgroundTask
WinRTComponent

Cancel
BackgroundTaskHost.exe

Cancel

Windows
demo
•

Hardware includes low-power
DRAM, busses, and devices

•

Always connected to the internet

•

App experiences are always fresh
and up to date

•

Transitions instantly between on
and off states (phone-like
behavior)

Requires very low idle
power to enable
Connected Standby
• How does this work
in connected standby?
Mobile broadband
Network
(e.g. 3G, 4G, LTE, etc.)
Connectivity

• Nothing special,
one model to stay
connected.
• Need a hardware slot
•

Implement a Cancel handler. Cancel all outstanding tasks by using
CancelationTokenSource
Longer Battery Life

Always Reachable Apps
http://go.microsoft.com/fwlink/?LinkID=227329&clcid=0x409
http://msdn.microsoft.com/en-us/library/windows/apps/hh452975.aspx
© 2012 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

More Related Content

What's hot

The Fine Art of JavaScript Event Handling
The Fine Art of JavaScript Event HandlingThe Fine Art of JavaScript Event Handling
The Fine Art of JavaScript Event HandlingYorick Phoenix
 
Introduction to React and MobX
Introduction to React and MobXIntroduction to React and MobX
Introduction to React and MobXAnjali Chawla
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events WebStackAcademy
 
The evolution of java script asynchronous calls
The evolution of java script asynchronous callsThe evolution of java script asynchronous calls
The evolution of java script asynchronous callsHuy Hoàng Phạm
 
Introduction to Service Workers | Matteo Manchi
Introduction to Service Workers | Matteo ManchiIntroduction to Service Workers | Matteo Manchi
Introduction to Service Workers | Matteo ManchiCodemotion
 
Asynchronous development in JavaScript
Asynchronous development  in JavaScriptAsynchronous development  in JavaScript
Asynchronous development in JavaScriptAmitai Barnea
 
Lazy Loading Because I'm Lazy
Lazy Loading Because I'm LazyLazy Loading Because I'm Lazy
Lazy Loading Because I'm LazyJohnathan Leppert
 
Promises, promises, and then observables
Promises, promises, and then observablesPromises, promises, and then observables
Promises, promises, and then observablesStefan Charsley
 
Avoiding callback hell in Node js using promises
Avoiding callback hell in Node js using promisesAvoiding callback hell in Node js using promises
Avoiding callback hell in Node js using promisesAnkit Agarwal
 
New improvements for web developers - frontend.fi, Helsinki
New improvements for web developers - frontend.fi, HelsinkiNew improvements for web developers - frontend.fi, Helsinki
New improvements for web developers - frontend.fi, HelsinkiRobert Nyman
 
JSON Rules Language
JSON Rules LanguageJSON Rules Language
JSON Rules Languagegiurca
 
Javascript dom event
Javascript dom eventJavascript dom event
Javascript dom eventBunlong Van
 
JavaScript promise
JavaScript promiseJavaScript promise
JavaScript promiseeslam_me
 
Swift & ReactiveX – Asynchronous Event-Based Funsies with RxSwift
Swift & ReactiveX – Asynchronous Event-Based Funsies with RxSwiftSwift & ReactiveX – Asynchronous Event-Based Funsies with RxSwift
Swift & ReactiveX – Asynchronous Event-Based Funsies with RxSwiftAaron Douglas
 
Deceptive simplicity of async and await
Deceptive simplicity of async and awaitDeceptive simplicity of async and await
Deceptive simplicity of async and awaitAndrei Marukovich
 
No More Deadlocks; Asynchronous Programming in .NET
No More Deadlocks; Asynchronous Programming in .NETNo More Deadlocks; Asynchronous Programming in .NET
No More Deadlocks; Asynchronous Programming in .NETFilip Ekberg
 
Asynchronous programming
Asynchronous programmingAsynchronous programming
Asynchronous programmingFilip Ekberg
 

What's hot (20)

The Fine Art of JavaScript Event Handling
The Fine Art of JavaScript Event HandlingThe Fine Art of JavaScript Event Handling
The Fine Art of JavaScript Event Handling
 
Introduction to React and MobX
Introduction to React and MobXIntroduction to React and MobX
Introduction to React and MobX
 
JS Anti Patterns
JS Anti PatternsJS Anti Patterns
JS Anti Patterns
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
 
The evolution of java script asynchronous calls
The evolution of java script asynchronous callsThe evolution of java script asynchronous calls
The evolution of java script asynchronous calls
 
Introduction to Service Workers | Matteo Manchi
Introduction to Service Workers | Matteo ManchiIntroduction to Service Workers | Matteo Manchi
Introduction to Service Workers | Matteo Manchi
 
Asynchronous development in JavaScript
Asynchronous development  in JavaScriptAsynchronous development  in JavaScript
Asynchronous development in JavaScript
 
Lazy Loading Because I'm Lazy
Lazy Loading Because I'm LazyLazy Loading Because I'm Lazy
Lazy Loading Because I'm Lazy
 
Promises, promises, and then observables
Promises, promises, and then observablesPromises, promises, and then observables
Promises, promises, and then observables
 
ActionHeroJS Talk
ActionHeroJS TalkActionHeroJS Talk
ActionHeroJS Talk
 
Avoiding callback hell in Node js using promises
Avoiding callback hell in Node js using promisesAvoiding callback hell in Node js using promises
Avoiding callback hell in Node js using promises
 
New improvements for web developers - frontend.fi, Helsinki
New improvements for web developers - frontend.fi, HelsinkiNew improvements for web developers - frontend.fi, Helsinki
New improvements for web developers - frontend.fi, Helsinki
 
JSON Rules Language
JSON Rules LanguageJSON Rules Language
JSON Rules Language
 
Javascript dom event
Javascript dom eventJavascript dom event
Javascript dom event
 
JavaScript promise
JavaScript promiseJavaScript promise
JavaScript promise
 
Swift & ReactiveX – Asynchronous Event-Based Funsies with RxSwift
Swift & ReactiveX – Asynchronous Event-Based Funsies with RxSwiftSwift & ReactiveX – Asynchronous Event-Based Funsies with RxSwift
Swift & ReactiveX – Asynchronous Event-Based Funsies with RxSwift
 
Deceptive simplicity of async and await
Deceptive simplicity of async and awaitDeceptive simplicity of async and await
Deceptive simplicity of async and await
 
No More Deadlocks; Asynchronous Programming in .NET
No More Deadlocks; Asynchronous Programming in .NETNo More Deadlocks; Asynchronous Programming in .NET
No More Deadlocks; Asynchronous Programming in .NET
 
Fetch data from form
Fetch data from formFetch data from form
Fetch data from form
 
Asynchronous programming
Asynchronous programmingAsynchronous programming
Asynchronous programming
 

Viewers also liked

El cuento presentacion
El cuento presentacionEl cuento presentacion
El cuento presentacionIsisJoya
 
Hip-Hop Record Label analysis
Hip-Hop Record Label analysisHip-Hop Record Label analysis
Hip-Hop Record Label analysisMolly Bingham
 
Medios didácticos para la creación de ambientes de aprendizaje
Medios didácticos para la creación de ambientes de aprendizajeMedios didácticos para la creación de ambientes de aprendizaje
Medios didácticos para la creación de ambientes de aprendizajeHarman Guido Sequeira
 
La contaminación de los ríos
La contaminación de los ríosLa contaminación de los ríos
La contaminación de los ríosjose98080556862
 
Enterprise Architecture 2013
Enterprise Architecture 2013Enterprise Architecture 2013
Enterprise Architecture 2013Vincent Tacquet
 
Apresentação animais...
Apresentação animais...Apresentação animais...
Apresentação animais...Alisson8744
 
Escribo un texto-
Escribo un texto-Escribo un texto-
Escribo un texto-Mar Jurado
 
Contaminación de los ríos
Contaminación de los ríosContaminación de los ríos
Contaminación de los ríosm1402j
 
Edu desigualdade
Edu desigualdadeEdu desigualdade
Edu desigualdadeAlex Silva
 
How Restaurant Operators Can Eliminate Work, By Creating Systems
How Restaurant Operators Can Eliminate Work, By Creating SystemsHow Restaurant Operators Can Eliminate Work, By Creating Systems
How Restaurant Operators Can Eliminate Work, By Creating Systemswalkert
 
Session Four: Results Interpretation & Application
Session Four: Results Interpretation & ApplicationSession Four: Results Interpretation & Application
Session Four: Results Interpretation & ApplicationNCHPEG
 
ο μυκηναϊκοσ κοσμοσ
ο μυκηναϊκοσ κοσμοσο μυκηναϊκοσ κοσμοσ
ο μυκηναϊκοσ κοσμοσmavraroda
 
Presentaciòn seguridad social 109 diapositivas
Presentaciòn seguridad social 109 diapositivasPresentaciòn seguridad social 109 diapositivas
Presentaciòn seguridad social 109 diapositivasMirta Hnriquez
 
Química orgánica ejemplos de alcanos ramificados
Química orgánica ejemplos de alcanos ramificadosQuímica orgánica ejemplos de alcanos ramificados
Química orgánica ejemplos de alcanos ramificadosDiego Martín Núñez
 

Viewers also liked (16)

El cuento presentacion
El cuento presentacionEl cuento presentacion
El cuento presentacion
 
Earned value and agile
Earned value and agileEarned value and agile
Earned value and agile
 
Hip-Hop Record Label analysis
Hip-Hop Record Label analysisHip-Hop Record Label analysis
Hip-Hop Record Label analysis
 
Medios didácticos para la creación de ambientes de aprendizaje
Medios didácticos para la creación de ambientes de aprendizajeMedios didácticos para la creación de ambientes de aprendizaje
Medios didácticos para la creación de ambientes de aprendizaje
 
La contaminación de los ríos
La contaminación de los ríosLa contaminación de los ríos
La contaminación de los ríos
 
Enterprise Architecture 2013
Enterprise Architecture 2013Enterprise Architecture 2013
Enterprise Architecture 2013
 
Pervasive gaming as a way of directing players to geographical locations
Pervasive gaming as a way of directing players to geographical locationsPervasive gaming as a way of directing players to geographical locations
Pervasive gaming as a way of directing players to geographical locations
 
Apresentação animais...
Apresentação animais...Apresentação animais...
Apresentação animais...
 
Escribo un texto-
Escribo un texto-Escribo un texto-
Escribo un texto-
 
Contaminación de los ríos
Contaminación de los ríosContaminación de los ríos
Contaminación de los ríos
 
Edu desigualdade
Edu desigualdadeEdu desigualdade
Edu desigualdade
 
How Restaurant Operators Can Eliminate Work, By Creating Systems
How Restaurant Operators Can Eliminate Work, By Creating SystemsHow Restaurant Operators Can Eliminate Work, By Creating Systems
How Restaurant Operators Can Eliminate Work, By Creating Systems
 
Session Four: Results Interpretation & Application
Session Four: Results Interpretation & ApplicationSession Four: Results Interpretation & Application
Session Four: Results Interpretation & Application
 
ο μυκηναϊκοσ κοσμοσ
ο μυκηναϊκοσ κοσμοσο μυκηναϊκοσ κοσμοσ
ο μυκηναϊκοσ κοσμοσ
 
Presentaciòn seguridad social 109 diapositivas
Presentaciòn seguridad social 109 diapositivasPresentaciòn seguridad social 109 diapositivas
Presentaciòn seguridad social 109 diapositivas
 
Química orgánica ejemplos de alcanos ramificados
Química orgánica ejemplos de alcanos ramificadosQuímica orgánica ejemplos de alcanos ramificados
Química orgánica ejemplos de alcanos ramificados
 

Similar to PLM and Background Tasks by Jason Fox

#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps run#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps runFrederik De Bruyne
 
DWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A TutorialDWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A Tutorialjbarciauskas
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web ToolkitsYiguang Hu
 
Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development Mahmoud Hamed Mahmoud
 
Windows phone 7 series
Windows phone 7 seriesWindows phone 7 series
Windows phone 7 seriesopenbala
 
The Open Web and what it means
The Open Web and what it meansThe Open Web and what it means
The Open Web and what it meansRobert Nyman
 
Declarative presentations UIKonf
Declarative presentations UIKonfDeclarative presentations UIKonf
Declarative presentations UIKonfNataliya Patsovska
 
Swiss army knife Spring
Swiss army knife SpringSwiss army knife Spring
Swiss army knife SpringMario Fusco
 
Magento 2 Seminar - Anton Kril - Magento 2 Summary
Magento 2 Seminar - Anton Kril - Magento 2 SummaryMagento 2 Seminar - Anton Kril - Magento 2 Summary
Magento 2 Seminar - Anton Kril - Magento 2 SummaryYireo
 
Taming event-driven software via formal verification
Taming event-driven software via formal verificationTaming event-driven software via formal verification
Taming event-driven software via formal verificationAdaCore
 
The Next Step in AS3 Framework Evolution
The Next Step in AS3 Framework EvolutionThe Next Step in AS3 Framework Evolution
The Next Step in AS3 Framework EvolutionFITC
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXIMC Institute
 
Speed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsSpeed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsYakov Fain
 
Event Sourcing - what could go wrong - Devoxx BE
Event Sourcing - what could go wrong - Devoxx BEEvent Sourcing - what could go wrong - Devoxx BE
Event Sourcing - what could go wrong - Devoxx BEAndrzej Ludwikowski
 
MongoDB.local DC 2018: Scaling Realtime Apps with Change Streams
MongoDB.local DC 2018: Scaling Realtime Apps with Change StreamsMongoDB.local DC 2018: Scaling Realtime Apps with Change Streams
MongoDB.local DC 2018: Scaling Realtime Apps with Change StreamsMongoDB
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture ComponentsBurhanuddinRashid
 
13 networking, mobile services, and authentication
13   networking, mobile services, and authentication13   networking, mobile services, and authentication
13 networking, mobile services, and authenticationWindowsPhoneRocks
 

Similar to PLM and Background Tasks by Jason Fox (20)

#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps run#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps run
 
Beat the Clock: Background Tasking in Windows 8
Beat the Clock: Background Tasking in Windows 8Beat the Clock: Background Tasking in Windows 8
Beat the Clock: Background Tasking in Windows 8
 
DWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A TutorialDWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A Tutorial
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits
 
Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development
 
Windows phone 7 series
Windows phone 7 seriesWindows phone 7 series
Windows phone 7 series
 
The Open Web and what it means
The Open Web and what it meansThe Open Web and what it means
The Open Web and what it means
 
Declarative presentations UIKonf
Declarative presentations UIKonfDeclarative presentations UIKonf
Declarative presentations UIKonf
 
Swiss army knife Spring
Swiss army knife SpringSwiss army knife Spring
Swiss army knife Spring
 
Magento 2 Seminar - Anton Kril - Magento 2 Summary
Magento 2 Seminar - Anton Kril - Magento 2 SummaryMagento 2 Seminar - Anton Kril - Magento 2 Summary
Magento 2 Seminar - Anton Kril - Magento 2 Summary
 
Flutter
FlutterFlutter
Flutter
 
Taming event-driven software via formal verification
Taming event-driven software via formal verificationTaming event-driven software via formal verification
Taming event-driven software via formal verification
 
The Next Step in AS3 Framework Evolution
The Next Step in AS3 Framework EvolutionThe Next Step in AS3 Framework Evolution
The Next Step in AS3 Framework Evolution
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
 
Speed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsSpeed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSockets
 
Event Sourcing - what could go wrong - Devoxx BE
Event Sourcing - what could go wrong - Devoxx BEEvent Sourcing - what could go wrong - Devoxx BE
Event Sourcing - what could go wrong - Devoxx BE
 
GreenRobot-Eventbus
GreenRobot-EventbusGreenRobot-Eventbus
GreenRobot-Eventbus
 
MongoDB.local DC 2018: Scaling Realtime Apps with Change Streams
MongoDB.local DC 2018: Scaling Realtime Apps with Change StreamsMongoDB.local DC 2018: Scaling Realtime Apps with Change Streams
MongoDB.local DC 2018: Scaling Realtime Apps with Change Streams
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture Components
 
13 networking, mobile services, and authentication
13   networking, mobile services, and authentication13   networking, mobile services, and authentication
13 networking, mobile services, and authentication
 

Recently uploaded

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Recently uploaded (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

PLM and Background Tasks by Jason Fox

  • 1.
  • 2.
  • 3.
  • 5.
  • 6.
  • 7. Apps do not get notified when they are getting terminated
  • 8. Registering for Suspend and Resume is Easy //Register for the Suspending event and call suspendingHandler when received Windows.UI.WebUI.WebUIApplication.addEventListener("suspending", suspendingHandler); //Handle the suspending event and save the current user session using WinJS sessionState function suspendingHandler(eventArgs) { //We are getting suspended } //Register for the Resuming event and call resumingHandler when received Windows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler); function resumingHandler( ) { //We are getting resumed, in general do nothing }
  • 9. Registering for Suspend and Resume is Easy // Register for the Suspending event and call OnSuspending when received // Handle the suspending event and save the current user session using WinJS sessionState void async var //TODO: Save application state and stop any background activity } // Register for the Resuming event and call OnResuming when received void object object { // We are getting resumed, in general do nothing }
  • 10.
  • 11.
  • 12.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. demo
  • 23. Example System Trigger Register on User Login using Windows.ApplicationModel.Background; // Specify the trigger IBackgroundTrigger trigger = new SystemTrigger(SystemTriggerType.SessionConnected, false); Create user login trigger Associate trigger with app code // Associate app code with the trigger BackgroundTaskBuilder taskBuilder = new BackgroundTaskBuilder(); taskBuilder.TaskEntryPoint = “MyApp.Background.RegisterForUserLogin"; taskBuilder.SetTrigger(trigger); taskBuilder.Name = “OnUserPresent"; Register // Register the task for background execution trigger IBackgroundTaskRegistration taskRegistration = taskBuilder.Register();
  • 24. Example System Trigger Background execution on User Login using Windows.ApplicationModel.Background; namespace MyApp.Background { public sealed class RegisterForUserLogin: IBackgroundTask { public void Run(IBackgroundTaskInstance taskInstance) { // Your app code } } }
  • 25. Trigger Lock screen Description UserPresent X User becomes present (touches screen, keyboard, mouse) UserAway X User becomes absent or system idle timer expires. SessionConnected X User logs in. ControlChannelReset X Control channel is reset InternetAvailable Internet becomes available NetworkStateChange Change in connection state (cost, network) ServicingComplete App update has finished OnlineIdConnectedStateChange Microsoft account connected to logon account has changed. LockScreenApplicationAdded An app has been added to the lock screen LockScreenApplicationRemoved An app has been removed from the lock screen TimeZoneChange The system time zone has changed SmsReceived SMS message received by mobile broadband device. BackgroundWorkCostChange X the cost of background work changes
  • 26.
  • 27. CPU resource quota Lock screen app Non-lock screen app Refresh period
  • 28. demo
  • 29. System Condition Description InternetAvailable/InternetNotAvailable Availability of Internet connectivity UserPresent / UserNotPresent Presence of user SessionConnected / SessionDisconnected User’s logged-on status FreeNetworkAvailable Availability of free internet BackgroundWorkCostNotHigh Only when on AC
  • 30. var t = new SystemTrigger(SystemTriggerType.NetworkStateChange, false); var btb = new BackgroundTaskBuilder() { TaskEntryPoint = "BGComponent.BTC", Name = "NetworkState Changed" }; btb.SetTrigger(t); SystemCondition c = new SystemCondition(SystemConditionType.UserPresent); btb.AddCondition(c); BackgroundTaskRegistration task = btb.Register();
  • 32. demo
  • 33. • Hardware includes low-power DRAM, busses, and devices • Always connected to the internet • App experiences are always fresh and up to date • Transitions instantly between on and off states (phone-like behavior) Requires very low idle power to enable Connected Standby
  • 34. • How does this work in connected standby? Mobile broadband Network (e.g. 3G, 4G, LTE, etc.) Connectivity • Nothing special, one model to stay connected. • Need a hardware slot
  • 35. • Implement a Cancel handler. Cancel all outstanding tasks by using CancelationTokenSource
  • 36.
  • 37.
  • 38.
  • 39. Longer Battery Life Always Reachable Apps
  • 41. © 2012 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

Editor's Notes

  1. See the following links for more details:Application lifecycle (Metro style apps): http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh464925.aspxGuidelines for app suspend and resume (Metro style apps): http://msdn.microsoft.com/en-us/library/windows/apps/hh465088.aspxForcing Metro Apps to terminate: http://iinspectable.wordpress.com/2012/07/08/forcing-metro-apps-to-terminate/
  2. WSA = one foreground full screen window that allows the user to work more efficientlyNon-visible WSAs are quickly suspended to preserve battery lifeAs a developer, you have to know how Windows manages your App lifetime and how to be a good citizen
  3. Demonstrate basic task switchingLaunch Weather: it takes full screen and there is no other App visibleLaunch Calendar: Weather is now running in the background but not for longShow task manager.Make sure you have selected View | Status Values | show Suspended StatusWait for Weather to suspendNOTE: click on the Status column to sort and see all the suspended AppsIt is still possible to run in the background in very specific cases: Launch Music and play a songShow task manager where Music is never suspendedRead http://blogs.msdn.com/b/b8/archive/2012/02/07/improving-power-efficiency-for-applications.aspx for more details about what is possible to run in the background with WinRTExplain that the system did all the work:Threads are suspended at Kernel level: no CPU is granted but memory is still thereThe App is still visible through Windows+TAB task list and “restart” instantlyLast but not least, Windows can decide to “terminate” any App in low memory conditions. Read http://iinspectable.wordpress.com/2012/07/08/forcing-metro-apps-to-terminate/ for more details + the ByeBye tool for the demo
  4. Apps get 5 seconds to handle suspension (save state etc.) Potentially a little more if there is I/O contentionYou will see that apps get into the suspended state after about 10 seconds.You can check it if you launch an App in Snap view and keep the Task Manager in the Filled view)Suspended Apps are notified before being suspendingAfter that event, no more CPU for the application threadsIf you take too long to suspend… you’ll get terminatedWindows is free to “terminate” any WSA if memory pressure is detectedApps are not notified before being terminatedSee http://msdn.microsoft.com/en-us/library/windows/desktop/aa366541(v=vs.85).aspx for API to use to detect when memory is running high/lowSee http://blogs.msdn.com/b/b8/archive/2012/04/17/reclaiming-memory-from-metro-style-apps.aspx for details about memory management based on Working Set metrics in Windows
  5. = “tombstoning” in Windows phone (read http://msdn.microsoft.com/en-us/library/ff817008(v=vs.92).aspx for the execution model in WP)This also visible with SysInternals Process Explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) where you see the same “Suspended” in the CPU column. It was possible to “suspend” a process in Windows 7 with Process Explorer: this is now done by Windows itself for WSAs.NOTE: Process Explorer is fully aware of WSAs = “Immersive” has new blue color. See Options | Configure Colors | Immersive Process + see package in tooltipWhen you right-click | Resume on a Suspended Metro App, it gets back automatically Suspending immediately by Windows
  6. The user can still decide to explicitly “close”/”end” an App by using ALT+F4In 8.1 the drag/drop touch gesture (“drag the top of the App and drag it down to the bottom of the screen”) suspends the app. (although it is removed from the ALT-TAB backstack)The system is also allowed to “terminate” the apps.. [users can do it too via task manager or Process Explorer]There is no event fired during termination… you should save all your stuff by “suspending” or when possible, along the user navigation in the AppDEMO: use ByeBye tool from http://iinspectable.wordpress.com/2012/07/08/forcing-metro-apps-to-terminate to consume as much memory (working set) as possible and see that first the Immersive App working set are trimmed and then some Apps get terminatedWatch http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/WCL405 for Mark Russinovich talk about Windows memory management
  7. Suspending:You have 5 seconds real time (not CPU time) to save what you need to save. If you take too long, the App will be terminated. Deferral here means telling the OS you are doing some async tasks; not that you want to get more than 5 sec time.In 8.1 Suspending happens with low priority (low I/O, lower thread priority) Suspend time compensates for this. Resuming:Sometimes useful for checking for updates in case of a News, weather, stocks App for example.Ex: you’ve stored the time of suspension and, on resuming, if there are more than x hours since then, the code checks for News updates.NOTE: when the App gets suspended, all the event handlers are still registered (sockets, system related,…) but will never get any CPU to run even if such an event occurs. So on resume you need to check your network, sockets, etc.
  8. Suspending:You have 5 seconds real time (not CPU time) to save what you need to save. If you take too long, the App will be terminated. Deferral here means telling the OS you are doing some async tasks; not that you want to get more than 5 sec time. Note the async keyword to indicate we’re going to call awaitable I/O functions. Resuming:Sometimes useful for checking for updates in case of a News, weather, stocks App for example.Ex: you’ve stored the time of suspension and, on resuming, if there are more than x hours since then, the code checks for News updates.NOTE: when the App gets suspended, all the event handlers are still registered (sockets, system related,…) but will never get any CPU to run even if such an event occurs. So on resume you need to check your network, sockets, etc.
  9. Create a new grid app from VSRun and navigate to a detail pageSuspend and shutdown from VS toolbarStart back up and show the app is back in detail pageUse PLM Basics to demo basic suspend and resume.Show suspend and resume from the debuggerDebug | Suspend / Resume / Resume and shutdownNotice when you suspend the progress bar stops moving Show terminated via the debugger or via the ByeBye toolsNOTE: it is complicated to get a previous Terminated state… (does not work via Task Manager wait suspend + Terminate  we get NotRunning). Need to start the App and start the same App via VS or use the Debug | Suspend + Resume and shutdown or use ByeByeNOTE: 5 seconds to save state in Suspending event look at SuspendingOperation.Deadline as a hint  readonlySee the following links for more details:HTML:http://msdn.microsoft.com/en-us/library/windows/apps/hh770838.aspxXAML: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/Hh770837(v=win.10).aspx
  10. Don’t wait until Suspending to save Settings or navigation informationNote: settings should apply immediately so… save them immediately too :^)XAML: new VS template implementation in Common\SuspensionManager to save the Frames navigation state
  11. Third row is key point of the slide. The whole reason we save during suspend is so that we can come back to that state on relaunch (not resume). On Resume an app can check if its data is stale. E.g. a news app that has not been used for 2 weeks, might want to update is front page.
  12. In Windows 8, you need to understand how you are activated. Some activations (e.g. Share) are not launching the full app. Main/secondary Tiles, Share, File Picker, file association…
  13. TODO: review for RTM version!!!
  14. OnLaunched is not triggered if activated by contracts
  15. Dont’ show thisdemo if the Lesson #6 about contracts has been alreadydelivered-------------------------------------------------------------------------------------------Show Contoso Recipes demo for C# and “06 - Contracts\Demos\1_Search\JavaScript” otherwiseUse this as an opportunity to show them how the debugger in Visual studio can attach to a process.To show this option:go into Project -> Properties -> Debugging … Check “Do not launch, but debug my code when it starts”Now you can start the debugger… but nothing will happen until you use a way to activate the App (search, share target, secondary tile…)NOTE: in case of light dismissed UI like the Share target, put a breakpoint in the UI code in order to avoid being dismissed during the switch to the debugger
  16. DebugContosoLaunch the app from Search contract (ensure it is not already running)Set a breakpoint in OnSearchActivated and OnLaunched (the latter is never hit)set a breakpoint in OnSuggestionRequested just once to avoid being stopped on each characterStep through the code.  show the parameters that get passed Open the search charm. Search for “French” or “Mexican” or what ever ( salt, pepper) .. See the breakpoint hit.. Don’t forget to show how the debugger in Visual studio can be attached to a process before being activated:go into Project -> Properties -> Debugging … Check “Do not launch, but debug my code when it starts”Now you can start the debugger… [but nothing will happen]
  17. TODO: check with RTM!!!
  18. Splashscreen and background colors are set in the App manifest.It’s used by Windows to display the first screen before the App code starts to runSame during activation through ContractsLast bullet is only if the user moves away from the splash screen. Also WACK requirement is 5 seconds.
  19. …but thisis not recommandedbecause not user friendlyHowever, sometimes… youdon’treally have the choice.I’veseendifferentideas to avoid the extendedsplashscreen; mostlyadding the progressinside the Main page. It is important becausewhenyouneed an Internet connection and itis not there, youdon’treallywant to bestuck in an extendedsplashscreenhelpless.Instead, show the connectionerror as embeddedtext in the main screen and provide a « retry » button.If youdon’t do that: thereisonly one choiceleft to the user… ALT+F4 NOTE: try to cache the data that you took forever to fetch; this will avoid the same wait next time the App is launched
  20. Splash Screen Sample: http://code.msdn.microsoft.com/windowsapps/Splash-screen-sample-89c1dc78Run sampleTalk about notification and coordinate retrievalShow sys splash object retrieval in App.xaml.cs and passing through constructorAlso show event registration for system splash screen dismissalShow initialization in ExtendedSplash.xaml.csTODO: same for JavaScript?!!!
  21. Some scenario require to be able to execute code even though the App is not running in the foreground
  22. Show the Declarations tab of the manifest. Add a background task. Discuss all the checkboxesDiscuss each.Audio is different and not a background task like the others with a trigger. Will discuss in mediaControl channel is for Network protocols: Voip, IM etc. System triggers can be a wide variety: login, network change, timezone change, etc. Timer for periodic triggersPush Notification Trigger can be used with WNS “raw”New is location trigger. It allows to set up a trigger based on GPS or location dataMissing is Maintenance trigger. It works like Time, but no lock screen requirement and will not run on battery
  23. Demo (previous slide) Requirements for non-lock screen app triggers (such as system).
  24. Animated slide:Your app registers trigger with windowsApp can be suspended (fade to 50% transparent)App can terminated (app block disappears)Trigger (lightning) firesWindows creates the processLoads up the WInRT componentCalls Run()Background process is torn down.
  25. @ 30:59System trigger api. This is session start.
  26. Most of these are pretty self explanatory. Some require a little explanationServicingCompleteLockScreenApplicationAdded/Removed (important for Connected Standby and hardware slots)Draw the distinction between lock screen and non-lock screen trigger. BackgroundWorkCostChange is new for 8.1:BackgroundWorkCostChange is used to indicate when a system condition changes. This is to allow an app to differentiate between for example being on battery or connected standby or on AC. When on AC, a background task can do a lot more. (On win8, this was somewhat the case too since the global pool would adapt to system changes. However this was completely opaque to the app and app had to assume worst condition). When the trigger fires, a task can use the BackgroundWorkCost class to query the current cost of the background task. You need to be a lock screen app to get BackgroundWorkCostChange. There are 3 values for work cost. Low is for DC, medium and high depend on the status of the global pool.
  27. Apps with background task on the lockscreen seen from a Users perspectiveIcons indicate status with badges. This has some additional manifest requirements (see later)Can have up to 7 apps (6+1 very special next to clock). This is to limit the number of critical background tasks. User can configure the most important apps for the lock screen in control panel.System makes a distinction between hardware slots and software slots for connected standby scenarios (just mention, too much detail).
  28. Should be demo’d (and updated)
  29. Better demo’d. Note the new alarms app for Win8.1
  30. Background tasks get limited resources. Compare with Win32 services and stress battery life. Quotas do not roll over and get replenished at next refresh periodBackground tasks will be suspended if you run out of CPU timeThere are also network quota that depend on the energy cost per byte (slow energy hungry network connections get less time and throughput) There are global pools for network and CPU. Not guaranteed since they are shared. For Communication appsThis is not for control channel triggers, so your app will always be reachable.
  31. Just like triggering Suspend and Resume you can trigger background tasks.
  32. Just like triggering Suspend and Resume you can trigger background tasks. Better demo’d
  33. Use the SDK sample: Background task sample. Change the time zone (first scenario). Fire the Trigger through Visual Studio IDEYou can snap the sample and fill with control panel to change time zone
  34. Connected standby is on new devicesVery low power mode: Only <5% power consumptionNICs are still connected. Devices are SoC devices (ARM or x86)
  35. @ 36:53Connected standby is on new devicesVery low power mode: Only <5% power consumptionNICs are still connected; timer still fires
  36. Hanging background tasks is a major cause for crashes (yes crashes) on Surface. Developers make BGT long running and this prevents systems to go into standby. A system provided watchdog process will detect a task as being idle and then first cancel, then kill it, thereby creating a crash dump. Conclusion: keep the task short. No loops, time-out on network connections, etc.
  37. Refer to media deck about priorities.
  38. @ 41:20