SlideShare une entreprise Scribd logo
1  sur  31
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

Contenu connexe

Tendances

勝敗は常に見積もりで決まる〜Redmineを使った時間記録の話
勝敗は常に見積もりで決まる〜Redmineを使った時間記録の話勝敗は常に見積もりで決まる〜Redmineを使った時間記録の話
勝敗は常に見積もりで決まる〜Redmineを使った時間記録の話
心 谷本
 
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
 

Tendances (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
 

En vedette (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
 

Similaire à Multitasking and Triggered Background Processing in Windows Phone 8.1

Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
Nicholas Jansma
 
2011 code camp
2011 code camp2011 code camp
2011 code camp
imranq2
 
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
 
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
 

Similaire à 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
 

Dernier

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Dernier (20)

The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 

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.

Notes de l'éditeur

  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.