SlideShare a Scribd company logo
Multitasking and Triggered Background
Processing in Windows Phone 8.1
Rob Irving
Senior Software Engineer – ALK Technologies
Microsoft MVP – Windows Platform Development
www.robwirving.com
@robwirving
Rob Irving
• Senior Software Engineer at ALK Technologies
• Microsoft MVP – Windows Platform Development
• Led development effort to bring CoPilot GPS
navigation app to Windows Phone 8
• In top 10 Free Navigation Apps in Window Phone store
• Windows Phone Dev by day and night
• Released 7 of my own apps to Windows Phone store
• http://bit.ly/AppsByRWI
• Blog: www.robwirving.com
• Twitter: @robwirving
Agenda
• What are Background Tasks
• History on Windows Phone 8
• What’s new in Windows Phone 8.1
• Triggered Background Tasks
• Geofencing
• XAML Tile Rendering
1.
2.
3.
4.
PeriodicTask, ResourceIntensiveTask
Hosted in a separate process
One trigger per task, multiple
conditions
Trigger Usage
System Trigger
UserPresent , UserAway,
SessionConnected,
TimeZoneChange,
NetworkStateChange,
InternetAvailable,
ServicingComplete
Run code on system events
TimeTrigger Data synchronization
MaintenanceTrigger Perform maintenance work on AC power



Geofence notifications can be received in the
background by a background task
new
new "LincolnSquareStore"
new
new
Id Required String N/A
Geoshape Required
Geocircle
(BasicGeoposition + Radius)
N/A
MonitoredStates Optional Entered/Exited/Removed Entered/Exited
SingleUse Optional True/False False
DwellTime Optional Timespan 10s
StartTime Optional DateTimeOffset 0/epoch
Duration Optional Timespan 0/forever
Render a Tile from your BackgroundTask!
New class XamlRenderingBackgroundTask
BackgroundTask + XAML Visual Tree
Use RenderTargetBitmap to render XAML visual tree
New in Windows Phone 8.1
Sort and manage which apps can
execute in the background
Controls number of apps that can
run in the background
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 capabilities
TimeTrigger will have a 30 min floor on Phone
Call RequestAccessAsync() to get your full quota!

channel9.msdn.com/Events/Build/2014

www.robwirving.com

@robwirving

bit.ly/AppsByRWI

linkedin.com/in/robwirving

slideshare.net/robwirving

1drv.ms/1oW9KYn

More Related Content

What's hot

Merge hells!! feature toggles to the rescue - Presented @ Agile Toronto
Merge hells!! feature toggles to the rescue - Presented @ Agile TorontoMerge hells!! feature toggles to the rescue - Presented @ Agile Toronto
Merge hells!! feature toggles to the rescue - Presented @ Agile Toronto
Leena N
 
Jenkins CI in Action
Jenkins CI in ActionJenkins CI in Action
Jenkins CI in Action
Mikhail Pobolovets
 
Revolutionize Your Workflow with ChatOps
Revolutionize Your Workflow with ChatOpsRevolutionize Your Workflow with ChatOps
Revolutionize Your Workflow with ChatOps
Tessa Mero
 
SplunkLive Brisbane Splunk for Developers
SplunkLive Brisbane Splunk for DevelopersSplunkLive Brisbane Splunk for Developers
SplunkLive Brisbane Splunk for Developers
Gabrielle Knowles
 
SplunkLive Melbourne Splunk for Developers
SplunkLive Melbourne Splunk for DevelopersSplunkLive Melbourne Splunk for Developers
SplunkLive Melbourne Splunk for Developers
Gabrielle Knowles
 
勝敗は常に見積もりで決まる〜Redmineを使った時間記録の話
勝敗は常に見積もりで決まる〜Redmineを使った時間記録の話勝敗は常に見積もりで決まる〜Redmineを使った時間記録の話
勝敗は常に見積もりで決まる〜Redmineを使った時間記録の話
心 谷本
 
Building Realtime Mobile Apps with React Native and Elixir
Building Realtime Mobile Apps with React Native and ElixirBuilding Realtime Mobile Apps with React Native and Elixir
Building Realtime Mobile Apps with React Native and Elixir
Osa Gaius
 
Improving the Pharo VM
Improving the Pharo VMImproving the Pharo VM
Improving the Pharo VM
FAST
 
Cross platform native development with appcelerator titanium (2014 devnexus)
Cross platform native development with appcelerator titanium (2014 devnexus)Cross platform native development with appcelerator titanium (2014 devnexus)
Cross platform native development with appcelerator titanium (2014 devnexus)
Stephen Feather
 
How open source is driving DevOps innovation: CloudOpen NA 2015
How open source is driving DevOps innovation: CloudOpen NA 2015How open source is driving DevOps innovation: CloudOpen NA 2015
How open source is driving DevOps innovation: CloudOpen NA 2015
Gordon Haff
 
Mikrofrontend a Module Federation
Mikrofrontend a Module FederationMikrofrontend a Module Federation
Mikrofrontend a Module Federation
The Software House
 
More Productivitiy with Spring Roo
More Productivitiy with Spring RooMore Productivitiy with Spring Roo
More Productivitiy with Spring Roo
Eberhard Wolff
 
Ciprian redinciuc continuous integration with jenkins for i os
Ciprian redinciuc   continuous integration with jenkins for i osCiprian redinciuc   continuous integration with jenkins for i os
Ciprian redinciuc continuous integration with jenkins for i os
Codecamp Romania
 
2013 t-dose - libre office easyhacks
2013   t-dose - libre office easyhacks2013   t-dose - libre office easyhacks
2013 t-dose - libre office easyhacks
Rob Snelders
 
Provisioning environments. A simplistic approach
Provisioning  environments. A simplistic approachProvisioning  environments. A simplistic approach
Provisioning environments. A simplistic approach
Eder Roger Souza
 
LinkedIn's Consistent Android Testing Environments Using Gradle
LinkedIn's Consistent Android Testing Environments Using GradleLinkedIn's Consistent Android Testing Environments Using Gradle
LinkedIn's Consistent Android Testing Environments Using Gradle
Drew Hannay
 
3x3: Speeding Up Mobile Releases
3x3: Speeding Up Mobile Releases3x3: Speeding Up Mobile Releases
3x3: Speeding Up Mobile Releases
Drew Hannay
 
ASP.NET 5 on the Raspberry PI 2
ASP.NET 5 on the Raspberry PI 2ASP.NET 5 on the Raspberry PI 2
ASP.NET 5 on the Raspberry PI 2
Jürgen Gutsch
 
Building Chatbots
Building ChatbotsBuilding Chatbots
Building Chatbots
Tessa Mero
 
Continuous delivery of embedded systems embedded meetup
Continuous delivery of embedded systems   embedded meetupContinuous delivery of embedded systems   embedded meetup
Continuous delivery of embedded systems embedded meetup
Mike Long
 

What's hot (20)

Merge hells!! feature toggles to the rescue - Presented @ Agile Toronto
Merge hells!! feature toggles to the rescue - Presented @ Agile TorontoMerge hells!! feature toggles to the rescue - Presented @ Agile Toronto
Merge hells!! feature toggles to the rescue - Presented @ Agile Toronto
 
Jenkins CI in Action
Jenkins CI in ActionJenkins CI in Action
Jenkins CI in Action
 
Revolutionize Your Workflow with ChatOps
Revolutionize Your Workflow with ChatOpsRevolutionize Your Workflow with ChatOps
Revolutionize Your Workflow with ChatOps
 
SplunkLive Brisbane Splunk for Developers
SplunkLive Brisbane Splunk for DevelopersSplunkLive Brisbane Splunk for Developers
SplunkLive Brisbane Splunk for Developers
 
SplunkLive Melbourne Splunk for Developers
SplunkLive Melbourne Splunk for DevelopersSplunkLive Melbourne Splunk for Developers
SplunkLive Melbourne Splunk for Developers
 
勝敗は常に見積もりで決まる〜Redmineを使った時間記録の話
勝敗は常に見積もりで決まる〜Redmineを使った時間記録の話勝敗は常に見積もりで決まる〜Redmineを使った時間記録の話
勝敗は常に見積もりで決まる〜Redmineを使った時間記録の話
 
Building Realtime Mobile Apps with React Native and Elixir
Building Realtime Mobile Apps with React Native and ElixirBuilding Realtime Mobile Apps with React Native and Elixir
Building Realtime Mobile Apps with React Native and Elixir
 
Improving the Pharo VM
Improving the Pharo VMImproving the Pharo VM
Improving the Pharo VM
 
Cross platform native development with appcelerator titanium (2014 devnexus)
Cross platform native development with appcelerator titanium (2014 devnexus)Cross platform native development with appcelerator titanium (2014 devnexus)
Cross platform native development with appcelerator titanium (2014 devnexus)
 
How open source is driving DevOps innovation: CloudOpen NA 2015
How open source is driving DevOps innovation: CloudOpen NA 2015How open source is driving DevOps innovation: CloudOpen NA 2015
How open source is driving DevOps innovation: CloudOpen NA 2015
 
Mikrofrontend a Module Federation
Mikrofrontend a Module FederationMikrofrontend a Module Federation
Mikrofrontend a Module Federation
 
More Productivitiy with Spring Roo
More Productivitiy with Spring RooMore Productivitiy with Spring Roo
More Productivitiy with Spring Roo
 
Ciprian redinciuc continuous integration with jenkins for i os
Ciprian redinciuc   continuous integration with jenkins for i osCiprian redinciuc   continuous integration with jenkins for i os
Ciprian redinciuc continuous integration with jenkins for i os
 
2013 t-dose - libre office easyhacks
2013   t-dose - libre office easyhacks2013   t-dose - libre office easyhacks
2013 t-dose - libre office easyhacks
 
Provisioning environments. A simplistic approach
Provisioning  environments. A simplistic approachProvisioning  environments. A simplistic approach
Provisioning environments. A simplistic approach
 
LinkedIn's Consistent Android Testing Environments Using Gradle
LinkedIn's Consistent Android Testing Environments Using GradleLinkedIn's Consistent Android Testing Environments Using Gradle
LinkedIn's Consistent Android Testing Environments Using Gradle
 
3x3: Speeding Up Mobile Releases
3x3: Speeding Up Mobile Releases3x3: Speeding Up Mobile Releases
3x3: Speeding Up Mobile Releases
 
ASP.NET 5 on the Raspberry PI 2
ASP.NET 5 on the Raspberry PI 2ASP.NET 5 on the Raspberry PI 2
ASP.NET 5 on the Raspberry PI 2
 
Building Chatbots
Building ChatbotsBuilding Chatbots
Building Chatbots
 
Continuous delivery of embedded systems embedded meetup
Continuous delivery of embedded systems   embedded meetupContinuous delivery of embedded systems   embedded meetup
Continuous delivery of embedded systems embedded meetup
 

Viewers also liked

Multitasking
MultitaskingMultitasking
Multitasking
nitikasethi
 
Multitasking presentation
Multitasking presentationMultitasking presentation
Multitasking presentation
junjunjnd
 
Psychology
PsychologyPsychology
Psychology
Rodelio Dela Cruz
 
Multi tasking ppt
Multi tasking pptMulti tasking ppt
Multi tasking ppt
Daria Frauenfelder
 
Psych 101 - Introduction to Psychology - Lecture 1
Psych 101 - Introduction to Psychology - Lecture 1Psych 101 - Introduction to Psychology - Lecture 1
Psych 101 - Introduction to Psychology - Lecture 1
WhatisPsychology
 
Introduction to general psychology
Introduction to general psychologyIntroduction to general psychology
Introduction to general psychology
Shaikh Mosin
 
Experimental Psychology
Experimental PsychologyExperimental Psychology
Experimental Psychology
Ella Mae Ayen
 
Introduction to psychology
Introduction to psychologyIntroduction to psychology
Introduction to psychology
Muddsar Siddiqui
 

Viewers also liked (8)

Multitasking
MultitaskingMultitasking
Multitasking
 
Multitasking presentation
Multitasking presentationMultitasking presentation
Multitasking presentation
 
Psychology
PsychologyPsychology
Psychology
 
Multi tasking ppt
Multi tasking pptMulti tasking ppt
Multi tasking ppt
 
Psych 101 - Introduction to Psychology - Lecture 1
Psych 101 - Introduction to Psychology - Lecture 1Psych 101 - Introduction to Psychology - Lecture 1
Psych 101 - Introduction to Psychology - Lecture 1
 
Introduction to general psychology
Introduction to general psychologyIntroduction to general psychology
Introduction to general psychology
 
Experimental Psychology
Experimental PsychologyExperimental Psychology
Experimental Psychology
 
Introduction to psychology
Introduction to psychologyIntroduction to psychology
Introduction to psychology
 

Similar to Multitasking and Triggered Background Processing in Windows Phone 8.1

Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
Nicholas Jansma
 
Quick look in Reactive Extensions
Quick look in Reactive ExtensionsQuick look in Reactive Extensions
Quick look in Reactive Extensions
johnlvidal
 
Xe OneDay - Modernizing Enterprise Apps
Xe OneDay - Modernizing Enterprise AppsXe OneDay - Modernizing Enterprise Apps
Xe OneDay - Modernizing Enterprise Apps
Mirco Vanini
 
Sinergija 12 WP8 is around the corner
Sinergija 12 WP8 is around the cornerSinergija 12 WP8 is around the corner
Sinergija 12 WP8 is around the corner
Catalin Gheorghiu
 
Developing Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapDeveloping Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGap
Amar Mesic
 
2011 code camp
2011 code camp2011 code camp
2011 code camp
imranq2
 
Making the Mobile Web Native with PhoneGap
Making the Mobile Web Native with PhoneGapMaking the Mobile Web Native with PhoneGap
Making the Mobile Web Native with PhoneGap
Roy Clarkson
 
Cross-Platform Development
Cross-Platform DevelopmentCross-Platform Development
Cross-Platform Development
Syed Owais Ali Chishti
 
Mah tweets oss wp7
Mah tweets oss wp7Mah tweets oss wp7
Mah tweets oss wp7
Nick Hodge
 
I knew there had to be a better way to build mobile apps
I knew there had to be a better way to build mobile appsI knew there had to be a better way to build mobile apps
I knew there had to be a better way to build mobile apps
Alius Petraška
 
The Great Mobile Debate: Native vs. Hybrid App Development
The Great Mobile Debate: Native vs. Hybrid App DevelopmentThe Great Mobile Debate: Native vs. Hybrid App Development
The Great Mobile Debate: Native vs. Hybrid App Development
Nick Landry
 
Mobile application development; Complete steps
Mobile application development; Complete stepsMobile application development; Complete steps
Mobile application development; Complete steps
 Abin Baby
 
Developing a mobile cross-platform library
Developing a mobile cross-platform libraryDeveloping a mobile cross-platform library
Developing a mobile cross-platform library
Kostis Dadamis
 
Google Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talkGoogle Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talk
Imam Raza
 
Wikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGapWikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGap
Ted Chien
 
Social Monitoring Tool codename Looking Glass, Patrice Pelland
Social Monitoring Tool codename Looking Glass, Patrice PellandSocial Monitoring Tool codename Looking Glass, Patrice Pelland
Social Monitoring Tool codename Looking Glass, Patrice Pelland
Fuenteovejuna
 
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapBuilding Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Nick Landry
 
Introduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / GraphsIntroduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / Graphs
Rahat Khanna a.k.a mAppMechanic
 
Qa extreme 2011 eran kinsbruner
Qa extreme 2011 eran kinsbrunerQa extreme 2011 eran kinsbruner
Qa extreme 2011 eran kinsbruner
Eran Kinsbrunner
 
Synapse india reviews on mobile application development
Synapse india reviews on mobile application developmentSynapse india reviews on mobile application development
Synapse india reviews on mobile application development
saritasingh19866
 

Similar to Multitasking and Triggered Background Processing in Windows Phone 8.1 (20)

Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 
Quick look in Reactive Extensions
Quick look in Reactive ExtensionsQuick look in Reactive Extensions
Quick look in Reactive Extensions
 
Xe OneDay - Modernizing Enterprise Apps
Xe OneDay - Modernizing Enterprise AppsXe OneDay - Modernizing Enterprise Apps
Xe OneDay - Modernizing Enterprise Apps
 
Sinergija 12 WP8 is around the corner
Sinergija 12 WP8 is around the cornerSinergija 12 WP8 is around the corner
Sinergija 12 WP8 is around the corner
 
Developing Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapDeveloping Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGap
 
2011 code camp
2011 code camp2011 code camp
2011 code camp
 
Making the Mobile Web Native with PhoneGap
Making the Mobile Web Native with PhoneGapMaking the Mobile Web Native with PhoneGap
Making the Mobile Web Native with PhoneGap
 
Cross-Platform Development
Cross-Platform DevelopmentCross-Platform Development
Cross-Platform Development
 
Mah tweets oss wp7
Mah tweets oss wp7Mah tweets oss wp7
Mah tweets oss wp7
 
I knew there had to be a better way to build mobile apps
I knew there had to be a better way to build mobile appsI knew there had to be a better way to build mobile apps
I knew there had to be a better way to build mobile apps
 
The Great Mobile Debate: Native vs. Hybrid App Development
The Great Mobile Debate: Native vs. Hybrid App DevelopmentThe Great Mobile Debate: Native vs. Hybrid App Development
The Great Mobile Debate: Native vs. Hybrid App Development
 
Mobile application development; Complete steps
Mobile application development; Complete stepsMobile application development; Complete steps
Mobile application development; Complete steps
 
Developing a mobile cross-platform library
Developing a mobile cross-platform libraryDeveloping a mobile cross-platform library
Developing a mobile cross-platform library
 
Google Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talkGoogle Developer Group(GDG) DevFest Event 2012 Android talk
Google Developer Group(GDG) DevFest Event 2012 Android talk
 
Wikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGapWikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGap
 
Social Monitoring Tool codename Looking Glass, Patrice Pelland
Social Monitoring Tool codename Looking Glass, Patrice PellandSocial Monitoring Tool codename Looking Glass, Patrice Pelland
Social Monitoring Tool codename Looking Glass, Patrice Pelland
 
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapBuilding Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGap
 
Introduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / GraphsIntroduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / Graphs
 
Qa extreme 2011 eran kinsbruner
Qa extreme 2011 eran kinsbrunerQa extreme 2011 eran kinsbruner
Qa extreme 2011 eran kinsbruner
 
Synapse india reviews on mobile application development
Synapse india reviews on mobile application developmentSynapse india reviews on mobile application development
Synapse india reviews on mobile application development
 

Recently uploaded

Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
Yara Milbes
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
Kubernetes at Scale: Going Multi-Cluster with Istio
Kubernetes at Scale:  Going Multi-Cluster  with IstioKubernetes at Scale:  Going Multi-Cluster  with Istio
Kubernetes at Scale: Going Multi-Cluster with Istio
Severalnines
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
ervikas4
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
Reetu63
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Paul Brebner
 
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabhQuarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
aisafed42
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
Maitrey Patel
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
kgyxske
 

Recently uploaded (20)

Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
Kubernetes at Scale: Going Multi-Cluster with Istio
Kubernetes at Scale:  Going Multi-Cluster  with IstioKubernetes at Scale:  Going Multi-Cluster  with Istio
Kubernetes at Scale: Going Multi-Cluster with Istio
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
 
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabhQuarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
 

Multitasking and Triggered Background Processing in Windows Phone 8.1

  • 1. Multitasking and Triggered Background Processing in Windows Phone 8.1 Rob Irving Senior Software Engineer – ALK Technologies Microsoft MVP – Windows Platform Development www.robwirving.com @robwirving
  • 2. Rob Irving • Senior Software Engineer at ALK Technologies • Microsoft MVP – Windows Platform Development • Led development effort to bring CoPilot GPS navigation app to Windows Phone 8 • In top 10 Free Navigation Apps in Window Phone store • Windows Phone Dev by day and night • Released 7 of my own apps to Windows Phone store • http://bit.ly/AppsByRWI • Blog: www.robwirving.com • Twitter: @robwirving
  • 3. Agenda • What are Background Tasks • History on Windows Phone 8 • What’s new in Windows Phone 8.1 • Triggered Background Tasks • Geofencing • XAML Tile Rendering
  • 4.
  • 5.
  • 8.
  • 9. Hosted in a separate process One trigger per task, multiple conditions
  • 10. Trigger Usage System Trigger UserPresent , UserAway, SessionConnected, TimeZoneChange, NetworkStateChange, InternetAvailable, ServicingComplete Run code on system events TimeTrigger Data synchronization MaintenanceTrigger Perform maintenance work on AC power
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 17. Geofence notifications can be received in the background by a background task new new "LincolnSquareStore" new new
  • 18. Id Required String N/A Geoshape Required Geocircle (BasicGeoposition + Radius) N/A MonitoredStates Optional Entered/Exited/Removed Entered/Exited SingleUse Optional True/False False DwellTime Optional Timespan 10s StartTime Optional DateTimeOffset 0/epoch Duration Optional Timespan 0/forever
  • 19.
  • 20. Render a Tile from your BackgroundTask! New class XamlRenderingBackgroundTask BackgroundTask + XAML Visual Tree Use RenderTargetBitmap to render XAML visual tree
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. New in Windows Phone 8.1 Sort and manage which apps can execute in the background Controls number of apps that can run in the background
  • 28. 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 capabilities TimeTrigger will have a 30 min floor on Phone Call RequestAccessAsync() to get your full quota!
  • 29.

Editor's Notes

  1. Anytime app is running code while not in foreground Great way to enhance user experience, get users to interact with your app
  2. History of Multitasking in Windows Phone 7 & 8
  3. Windows Phone 7 didn’t really have multitasking Windows Phone 8 added new mechanisms to provide content when not in the foreground app Live tiles or toasts – triggered by push notifications or scheduled OS Brokered tasks like background downloads Background tasks and agents which would run periodically
  4. In WP8 we had PeriodicTasks and ResourceIntensiveTasks which would run periodically every half hour or so. Could be used to download new content for the user, update tiles, etc. Background Transfer Service allowed you to download large files while not in the foreground Background location tracking is a special exception for navigation apps like CoPilot. As long as these apps are still actively using the GPS they would be allowed to continue running while not in the foreground. VOIP and Audio Agents were another special case of background execution for apps like Skype or Pandora.
  5. The new Windows Runtime Background execution model is centered around Background Tasks. Rather then running periodically they respond to triggers or conditions. This is a converged API, so it’s the same background tasks that are available for Windows Apps. Because it’s a converged API you do need to request access to run in the background.. On Windows this would display a popup, but on Windows Phone there’s no UI. You still need to check though, and there are certain conditions that would cause background access to not be granted, such as if the user disabled your app through the battery saver settings.
  6. Here are some of the different triggers available. If you’ve done any development with Windows Store apps these may be familiar because it is a converged API. Go over System Triggers TimeTrigger run task on an interval, must specify atleast a 30 minute intervals, but on windows phone interval will usually be no less then half an hour. Maintenance Trigger similar to the resource intensive task, run resource intensive code when the phone is plugged in
  7. Demo Time Demo in WP8.1 Silverlight, all of the new multitasking features for Windows Universal Apps are also available for Windows Phone Silverlight 8.1 Registering background task in C# Display available memory in C# toast At Build all the sessions I went to about background tasks told us that we should be writing our background task code in C++. Background tasks have a limited amount of memory resources available to them ~16MB, by not loading up the CLR you can save a few MBs and hopefully avoid Out of Memory exceptions. You can still write your apps in C#, but the nice thing about the Windows Runtime is that you can interoperate between C#, C++ and even WinJS really easily. Convert C# Background Task into a C++ project Modify code and manifest to register C++ background task
  8. All of the tasks I’ve showed you so far were already there for Windows Store, so now we’ll go into some new forms of multitasking
  9. All this is available for Silverlight 8.1. So if you’re already invested with apps developed in Windows Phone 8, like I am. Then you can still benefit from all these new background tasks without having to migrate to the Windows Univeral App Model. When you upgrade to 8.1 your 8.0 style background agents will be hosted on top of the modern background infrastructure and should run better with the newer resource management. Note that you should make sure you don’t have a mix of 8.0 BG Agents and 8.1 BG Tasks as conflicts will occur with mixing the Silverlight CLR and WinRT CLR. If you write your BG Agent/Task code in C++ though you’ll be fine.
  10. Not a Bluetooth expert so I don’t have a demo to show about any of the new Bluetooth functionality here, but I’m really excited about it. Bluetooth LE is a new feature for Windows Phone 8.1 it should be available in many of the newer phones, Lumia Icon, 930, 1520 and 630. Bluetooth triggers are based on existing WinRT Bluetooth APIs DeviceChange is pretty self explanatory if a Device connects or reconnects to the phone this trigger will be raised DeviceUpdate trigger is going to be core to how fitness apps like FitBit could integrate with Windows Phone. With these you’ll be able to have a long running background task that communicates with Bluetooth LE devices like heart rate monitors or pedometers
  11. You can now have your app setup a Windows Notification Service channel and associate it with a background task Then any raw push notifications that come through on that channel will activate the background task. This can be really useful for news reader applications or social media like twitter or facebook. I know one thing that frustrates me with twitter is that I’ll see a notification come through from twitter, and click on it to activate the app. When I go into the app though it still needs to connect to the service and fetch the new tweets. With these new background tasks that handle RAW notifications a service like twitter could get the notification, connect to the service to refresh content and THEN show a toast notification to let me know that someone mentioned me. It’ll make the app appear more responsive to me, even though in reality I’m getting my toast notification a second or two later.
  12. One of the things done most frequently with periodic tasks in WP8.0 was updating tiles. A lot of developers would take some XAML, render it to a bitmap and then update a tile with that bitmap. If you’ve done any development on Windows 8 you might know that this wasn’t possible with Windows 8 background tasks. It’s not possible to access the XAML tree there. So a new type of background task is available for Windows Phone that gives access to the XAML visual tree. So in this background task you’ll basically create some XAML, use RenderTargetBitmap to render the XAML to a PNG and then you can use that PNG to update your tile
  13. So the interesting thing about this demo is that Microsoft wants you to use C++ for XamlRenderingBackgroundTasks so much that they didn’t make a C# version of the sample code. But when working on this presentation I was curious about what the memory savings would look like in a more complex demo like this, so I converted the C++ task into a C# one to compare them.