SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Building metro style
         applications on Windows 8
           using background task
                                            Radu Vunvulea
                                                   iQuest
                        http://vunvulearadu.blogspot.com
                                  Twitter: @RaduVunvulea

@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
ITCamp 2012 sponsors                                                       Development




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
Agenda                                                                     Development


•   Why we need background tasks
•   Base concepts
•   When to use them
•   Triggers
•   Conditions
•   Notifications
•   Demo
•   Tips and Tricks
•   Q&A

@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
Why we need background tasks                                               Development


• What happens with classic applications?

• Where Windows Services vanish?

• Why do I need background tasks?




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
Why we need background tasks                                               Development


• What happens with classic applications?

• Where Windows Services vanish?

• Why do I need background tasks?




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
Windows Metro Applications                                                 Development


• Similar to Windows Phone applications
• Only threads from the current application
  (foreground) are running




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
Background tasks                                                           Development


• Running code in background
• The background task doesn’t depend on
  application state
• Small work items
• No interaction with UI
• What we gain:
     – Smooth user experience
     – Long battery life



@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
Background task types                                                      Development


• System
     – Playback manager
     – Push notification
     – Background transfer API
         • Upload files
         • Download files
• User-defined
     – Almost any type of custom action




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
When to use them                                                           Development


•   Receive chat message
•   Process an incoming SMS
•   Download email
•   Display a toast notification
•   Execute action when something changes
•   Display UI, play music
•   Process photos
•   Index data


@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
Background task triggers                                                         Development




ControlChannelTrigger                        ServicingComplete
InternetAvailable                            SessionConnected
InternetNotAvailable                         SessionDisconnected
LockScreenApplicationAdded                   SessionStart
LockScreenApplicationRemoved                 SmsReceived
MaintenanceTrigger                           TimeTrigger
NetworkNotificationChannelReset              TimeZoneChange
NetworkStateChange                           UserAway
OnlineIdConnectedStateChange                 UserPresent
PushNotificationTrigger




@   itcampro        # itcamp12    Premium conference on Microsoft technologies
Mobile &
Background task triggers                                                         Development




ControlChannelTrigger                        ServicingComplete
InternetAvailable                            SessionConnected
InternetNotAvailable                         SessionDisconnected
LockScreenApplicationAdded                   SessionStart
LockScreenApplicationRemoved                 SmsReceived
MaintenanceTrigger                           TimeTrigger
NetworkNotificationChannelReset              TimeZoneChange
NetworkStateChange                           UserAway
OnlineIdConnectedStateChange                 UserPresent
PushNotificationTrigger




@   itcampro        # itcamp12    Premium conference on Microsoft technologies
Mobile &
Background task triggers                                                         Development

• Some triggers require the application to be on the lock screen

ControlChannelTrigger                        ServicingComplete
InternetAvailable                            SessionConnected
InternetNotAvailable                         SessionDisconnected
LockScreenApplicationAdded                   SessionStart
LockScreenApplicationRemoved                 SmsReceived
MaintenanceTrigger                           TimeTrigger
NetworkNotificationChannelReset              TimeZoneChange
NetworkStateChange                           UserAway
OnlineIdConnectedStateChange                 UserPresent
PushNotificationTrigger

• An application can register to be notified when it is added or removed
  from lock screen

@   itcampro    # itcamp12        Premium conference on Microsoft technologies
Mobile &
Background task conditions                                                 Development


• 0..n conditions can be added to each
  background task
• Only when all conditions are met, the given
  task is launched
     Background task condition   The condition that must be satisfied
     InternetAvailable           The Internet must be available.
     InternetNotAvailable        The Internet must be unavailable.
     SessionConnected            The session must be connected.
     SessionDisconnected         The session must be disconnected.
     UserNotPresent              The user must be away.
     UserPresent                 The user must be present.



@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
Background task infrastructure                                                                 Development

                            Application             System


                  4. Launch background task



                                                                            System




        My Application                                                              3. Fire trigger
                              2. Register class with triggers




                                                                     Control Channel
                                                                      Control Channel
                             1. Register trigger                         Trigger
                                                                          Trigger




@   itcampro    # itcamp12                Premium conference on Microsoft technologies
Mobile &
Where a background task run                                                        Development




                   Application                         BackgroundTaskHost.exe




                                      Application or
                                 BackgroundTaskHost.exe




@   itcampro   # itcamp12           Premium conference on Microsoft technologies
Mobile &
Where a background task run                                                          Development


                                                           TimeTrigger
                                                          SystemTrigger
               ControlChannelTrigger                    MaintenanceTrigger


                     Application                         BackgroundTaskHost.exe




                                        Application or
                                   BackgroundTaskHost.exe



                               PushNotificationTrigger




@   itcampro    # itcamp12            Premium conference on Microsoft technologies
Mobile &
Notifications                                                              Development


• The following notification can send to the
  base application:
     – Progress notifications
     – Completion notifications
     – Exceptions thrown
• A background task can be receive
  cancellations notifications only from
  operating system
     – The task have 5s to save his state until the system
       close the application

@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
Basic steps to implement                                                     Development


• JavaScript
     –   Add a new dedicated worker file
• C#/C++
     – Add a new Windows 8 Metro style app class library project to
       the solution.
     – Add a reference to the newly added class library project in the
       main Windows 8 Metro style app project that registers the
       background tasks.
     – Ensure that the output type of the class library is Winmd and
       not DLL.
     – Add the required manifest entries for background tasks to the
       Windows 8 Metro style app
     – Seal the class that implements the IBackgroundTask


@   itcampro   # itcamp12     Premium conference on Microsoft technologies
Mobile &
Base classes                                                               Development


• IBackgroundTask – used to implement the
  background task
• IBackgroundTaskInstance – provides access to a
  background task instance
• BackgroundTaskDeferral – used for async calls
  from background task
• BackgroundTaskBuilder – used to register a
  background task
• BackgroundTaskRegistration – a background
  class that was registered
• BackgroundTaskRegistration.AllTasks – get a list
  of tasks of the current application

@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
Live demo                                                                  Development




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
CPU resource constrains                                                          Development


• Limited CPU time for each application
• Use BackgroundTaskDeferral for async calls
                              CPU resource quota Refresh period

     Lock screen app          2 CPU seconds            15 minutes

     Non-lock screen app      1 CPU second             2 hours


• Restrictions are applied on AC power also
• Exceptions:
     – Control channel
     – Push notifications

@   itcampro     # itcamp12       Premium conference on Microsoft technologies
Mobile &
Network resource constraints                                                               Development


• Different network interfaces require different
  amount of energy
• Wi-Fi resource constraints:
     Average      Data throughput, in megabytes (MB)        Data throughput, in MB, for non-lock
     throughput   for lock screen apps                      screen apps

                  Every 15”   Per day     Every 2 hours     Per day
     1 Mbps       0.1875      18          0.25              3
     10 Mbps      1.875       180         2.5               30
     20 Mbps      3.75        360         5                 60



• On AC power there is no limitation for Wi-Fi
  network

@   itcampro      # itcamp12             Premium conference on Microsoft technologies
Mobile &
Tips and tricks                                                            Development


• TimeTrigger minimum time interval is 15 minutes
• Progress and Complete handlers needs to be
  associated each time when application start
• BackgroundTaskDeferral can be used for async calls
• Don’t rely on global pool when all allocated CPU
  time was used
• When a background task is suspended a message is
  logged in the Event Viewer.
• Share data between application and background
  task only by files or State Manager


@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Mobile &
Best practices                                                             Development


• Design background tasks to be short lived
• Use persistent storage to share data
  between the background task and the app
• Verify if the app needs to be on the lock
  screen
• Do not display UI other than toast, tiles or
  badges from a background task.
• Do not rely on user interaction in
  background tasks
@   itcampro   # itcamp12   Premium conference on Microsoft technologies
@   itcampro   # itcamp12   Premium conference on Microsoft technologies
THE END



                                                           Radu Vunvulea
                                                                  iQuest
                                       http://vunvulearadu.blogspot.com
                                                 Twitter: @RaduVunvulea

@   itcampro   # itcamp12    Premium conference on Microsoft technologies

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction - Trend Micro Deep Security
Introduction - Trend Micro Deep SecurityIntroduction - Trend Micro Deep Security
Introduction - Trend Micro Deep SecurityAndrew Wong
 
Security Technology Arms Race - Hack in the Box 2021 keynote
Security Technology Arms Race - Hack in the Box 2021 keynoteSecurity Technology Arms Race - Hack in the Box 2021 keynote
Security Technology Arms Race - Hack in the Box 2021 keynoteMarkDowd13
 
Trend Micro Dec 6 Toronto VMUG
Trend Micro Dec 6 Toronto VMUGTrend Micro Dec 6 Toronto VMUG
Trend Micro Dec 6 Toronto VMUGtovmug
 
AWS Partner Presentation - TrendMicro - Securing your Journey to the Cloud, A...
AWS Partner Presentation - TrendMicro - Securing your Journey to the Cloud, A...AWS Partner Presentation - TrendMicro - Securing your Journey to the Cloud, A...
AWS Partner Presentation - TrendMicro - Securing your Journey to the Cloud, A...Amazon Web Services
 
Developing for Windows Phone 8.1 (Dan Ardelean)
Developing for Windows Phone 8.1 (Dan Ardelean)Developing for Windows Phone 8.1 (Dan Ardelean)
Developing for Windows Phone 8.1 (Dan Ardelean)ITCamp
 
Developing for Windows Phone 8.1
Developing for Windows Phone 8.1Developing for Windows Phone 8.1
Developing for Windows Phone 8.1Dan Ardelean
 
IPNexus Datasheet
IPNexus DatasheetIPNexus Datasheet
IPNexus DatasheetClearOne
 
Trend Micro - 13martie2012
Trend Micro - 13martie2012Trend Micro - 13martie2012
Trend Micro - 13martie2012Agora Group
 
Mikehall FutureWorld 2010 - enabling connectivity
Mikehall FutureWorld 2010 - enabling connectivityMikehall FutureWorld 2010 - enabling connectivity
Mikehall FutureWorld 2010 - enabling connectivityMicrosoft Windows Embedded
 
Barco CineCare Web
Barco CineCare WebBarco CineCare Web
Barco CineCare WebBarco
 
BYOD - Protecting Your School
BYOD - Protecting Your SchoolBYOD - Protecting Your School
BYOD - Protecting Your SchoolSophos
 
Tech trendnotes
Tech trendnotesTech trendnotes
Tech trendnotesStudying
 
Cloud Security: Perception Vs. Reality
Cloud Security: Perception Vs. RealityCloud Security: Perception Vs. Reality
Cloud Security: Perception Vs. RealityInternap
 
Trend micro - Your journey to the cloud, where are you
Trend micro - Your journey to the cloud, where are youTrend micro - Your journey to the cloud, where are you
Trend micro - Your journey to the cloud, where are youGlobal Business Events
 
Mitigating Risk for the Mobile Worker: Novell ZENworks Endpoint Security Mana...
Mitigating Risk for the Mobile Worker: Novell ZENworks Endpoint Security Mana...Mitigating Risk for the Mobile Worker: Novell ZENworks Endpoint Security Mana...
Mitigating Risk for the Mobile Worker: Novell ZENworks Endpoint Security Mana...Novell
 

Was ist angesagt? (20)

Introduction - Trend Micro Deep Security
Introduction - Trend Micro Deep SecurityIntroduction - Trend Micro Deep Security
Introduction - Trend Micro Deep Security
 
Security Technology Arms Race - Hack in the Box 2021 keynote
Security Technology Arms Race - Hack in the Box 2021 keynoteSecurity Technology Arms Race - Hack in the Box 2021 keynote
Security Technology Arms Race - Hack in the Box 2021 keynote
 
Trend Micro Dec 6 Toronto VMUG
Trend Micro Dec 6 Toronto VMUGTrend Micro Dec 6 Toronto VMUG
Trend Micro Dec 6 Toronto VMUG
 
AWS Partner Presentation - TrendMicro - Securing your Journey to the Cloud, A...
AWS Partner Presentation - TrendMicro - Securing your Journey to the Cloud, A...AWS Partner Presentation - TrendMicro - Securing your Journey to the Cloud, A...
AWS Partner Presentation - TrendMicro - Securing your Journey to the Cloud, A...
 
Developing for Windows Phone 8.1 (Dan Ardelean)
Developing for Windows Phone 8.1 (Dan Ardelean)Developing for Windows Phone 8.1 (Dan Ardelean)
Developing for Windows Phone 8.1 (Dan Ardelean)
 
Developing for Windows Phone 8.1
Developing for Windows Phone 8.1Developing for Windows Phone 8.1
Developing for Windows Phone 8.1
 
IPNexus Datasheet
IPNexus DatasheetIPNexus Datasheet
IPNexus Datasheet
 
Trend Micro - 13martie2012
Trend Micro - 13martie2012Trend Micro - 13martie2012
Trend Micro - 13martie2012
 
Mikehall FutureWorld 2010 - enabling connectivity
Mikehall FutureWorld 2010 - enabling connectivityMikehall FutureWorld 2010 - enabling connectivity
Mikehall FutureWorld 2010 - enabling connectivity
 
Barco CineCare Web
Barco CineCare WebBarco CineCare Web
Barco CineCare Web
 
Empower Employee to Work Anyplace, Amytime
Empower Employee to Work Anyplace, AmytimeEmpower Employee to Work Anyplace, Amytime
Empower Employee to Work Anyplace, Amytime
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Mobilemonday b2b mobco
Mobilemonday b2b   mobcoMobilemonday b2b   mobco
Mobilemonday b2b mobco
 
Moderne device management door middel van cloud
Moderne device management door middel van cloudModerne device management door middel van cloud
Moderne device management door middel van cloud
 
BYOD - Protecting Your School
BYOD - Protecting Your SchoolBYOD - Protecting Your School
BYOD - Protecting Your School
 
Tech trendnotes
Tech trendnotesTech trendnotes
Tech trendnotes
 
Mobile application development
Mobile application developmentMobile application development
Mobile application development
 
Cloud Security: Perception Vs. Reality
Cloud Security: Perception Vs. RealityCloud Security: Perception Vs. Reality
Cloud Security: Perception Vs. Reality
 
Trend micro - Your journey to the cloud, where are you
Trend micro - Your journey to the cloud, where are youTrend micro - Your journey to the cloud, where are you
Trend micro - Your journey to the cloud, where are you
 
Mitigating Risk for the Mobile Worker: Novell ZENworks Endpoint Security Mana...
Mitigating Risk for the Mobile Worker: Novell ZENworks Endpoint Security Mana...Mitigating Risk for the Mobile Worker: Novell ZENworks Endpoint Security Mana...
Mitigating Risk for the Mobile Worker: Novell ZENworks Endpoint Security Mana...
 

Andere mochten auch

How to migrate a monolithic system to microservices, Radu Vunvulea DevTalks, ...
How to migrate a monolithic system to microservices, Radu Vunvulea DevTalks, ...How to migrate a monolithic system to microservices, Radu Vunvulea DevTalks, ...
How to migrate a monolithic system to microservices, Radu Vunvulea DevTalks, ...Radu Vunvulea
 
What new in asp.net mvc, 5 visual studio 2015 and web tooling, radu vunvulea,...
What new in asp.net mvc, 5 visual studio 2015 and web tooling, radu vunvulea,...What new in asp.net mvc, 5 visual studio 2015 and web tooling, radu vunvulea,...
What new in asp.net mvc, 5 visual studio 2015 and web tooling, radu vunvulea,...Radu Vunvulea
 
First 13 steps to be able to design an application for Azure Service Fabric
First 13 steps to be able to design an application for Azure Service FabricFirst 13 steps to be able to design an application for Azure Service Fabric
First 13 steps to be able to design an application for Azure Service FabricRadu Vunvulea
 
How to use windows azure features on windows
How to use windows azure features on windowsHow to use windows azure features on windows
How to use windows azure features on windowsRadu Vunvulea
 
Radu vunvulea refactoring&code smells
Radu vunvulea   refactoring&code smellsRadu vunvulea   refactoring&code smells
Radu vunvulea refactoring&code smellsRadu Vunvulea
 
Backbone.js - Dragos Andronic
Backbone.js - Dragos AndronicBackbone.js - Dragos Andronic
Backbone.js - Dragos AndronicRadu Vunvulea
 
Radu vunvulea building and testing windows 8 metro style applications using ...
Radu vunvulea  building and testing windows 8 metro style applications using ...Radu vunvulea  building and testing windows 8 metro style applications using ...
Radu vunvulea building and testing windows 8 metro style applications using ...Radu Vunvulea
 
How to crunch 1 m messages per second in 4 easy steps - Radu Vunvulea
How to crunch 1 m messages per second in 4 easy steps - Radu VunvuleaHow to crunch 1 m messages per second in 4 easy steps - Radu Vunvulea
How to crunch 1 m messages per second in 4 easy steps - Radu VunvuleaRadu Vunvulea
 
Load tests using visual studio 2013 and Cloud
Load tests using visual studio 2013 and CloudLoad tests using visual studio 2013 and Cloud
Load tests using visual studio 2013 and CloudRadu Vunvulea
 
Mobile services on windows azure (part2)
Mobile services on windows azure (part2)Mobile services on windows azure (part2)
Mobile services on windows azure (part2)Radu Vunvulea
 
The Real Life Story of an Iot framework,ITDevConnect 2016, Bucharest, Radu Vu...
The Real Life Story of an Iot framework,ITDevConnect 2016, Bucharest, Radu Vu...The Real Life Story of an Iot framework,ITDevConnect 2016, Bucharest, Radu Vu...
The Real Life Story of an Iot framework,ITDevConnect 2016, Bucharest, Radu Vu...Radu Vunvulea
 
Good design of a startup product
Good design of a startup productGood design of a startup product
Good design of a startup productRadu Vunvulea
 
What about Azure IoT Hub | Radu Vunvulea
What about Azure IoT Hub | Radu VunvuleaWhat about Azure IoT Hub | Radu Vunvulea
What about Azure IoT Hub | Radu VunvuleaRadu Vunvulea
 
Docker + .NET Core Demos | Radu Vunvulea
Docker + .NET Core Demos | Radu VunvuleaDocker + .NET Core Demos | Radu Vunvulea
Docker + .NET Core Demos | Radu VunvuleaRadu Vunvulea
 

Andere mochten auch (15)

How to migrate a monolithic system to microservices, Radu Vunvulea DevTalks, ...
How to migrate a monolithic system to microservices, Radu Vunvulea DevTalks, ...How to migrate a monolithic system to microservices, Radu Vunvulea DevTalks, ...
How to migrate a monolithic system to microservices, Radu Vunvulea DevTalks, ...
 
What new in asp.net mvc, 5 visual studio 2015 and web tooling, radu vunvulea,...
What new in asp.net mvc, 5 visual studio 2015 and web tooling, radu vunvulea,...What new in asp.net mvc, 5 visual studio 2015 and web tooling, radu vunvulea,...
What new in asp.net mvc, 5 visual studio 2015 and web tooling, radu vunvulea,...
 
First 13 steps to be able to design an application for Azure Service Fabric
First 13 steps to be able to design an application for Azure Service FabricFirst 13 steps to be able to design an application for Azure Service Fabric
First 13 steps to be able to design an application for Azure Service Fabric
 
How to use windows azure features on windows
How to use windows azure features on windowsHow to use windows azure features on windows
How to use windows azure features on windows
 
Radu vunvulea refactoring&code smells
Radu vunvulea   refactoring&code smellsRadu vunvulea   refactoring&code smells
Radu vunvulea refactoring&code smells
 
HDFS and Hadoop
HDFS and Hadoop HDFS and Hadoop
HDFS and Hadoop
 
Backbone.js - Dragos Andronic
Backbone.js - Dragos AndronicBackbone.js - Dragos Andronic
Backbone.js - Dragos Andronic
 
Radu vunvulea building and testing windows 8 metro style applications using ...
Radu vunvulea  building and testing windows 8 metro style applications using ...Radu vunvulea  building and testing windows 8 metro style applications using ...
Radu vunvulea building and testing windows 8 metro style applications using ...
 
How to crunch 1 m messages per second in 4 easy steps - Radu Vunvulea
How to crunch 1 m messages per second in 4 easy steps - Radu VunvuleaHow to crunch 1 m messages per second in 4 easy steps - Radu Vunvulea
How to crunch 1 m messages per second in 4 easy steps - Radu Vunvulea
 
Load tests using visual studio 2013 and Cloud
Load tests using visual studio 2013 and CloudLoad tests using visual studio 2013 and Cloud
Load tests using visual studio 2013 and Cloud
 
Mobile services on windows azure (part2)
Mobile services on windows azure (part2)Mobile services on windows azure (part2)
Mobile services on windows azure (part2)
 
The Real Life Story of an Iot framework,ITDevConnect 2016, Bucharest, Radu Vu...
The Real Life Story of an Iot framework,ITDevConnect 2016, Bucharest, Radu Vu...The Real Life Story of an Iot framework,ITDevConnect 2016, Bucharest, Radu Vu...
The Real Life Story of an Iot framework,ITDevConnect 2016, Bucharest, Radu Vu...
 
Good design of a startup product
Good design of a startup productGood design of a startup product
Good design of a startup product
 
What about Azure IoT Hub | Radu Vunvulea
What about Azure IoT Hub | Radu VunvuleaWhat about Azure IoT Hub | Radu Vunvulea
What about Azure IoT Hub | Radu Vunvulea
 
Docker + .NET Core Demos | Radu Vunvulea
Docker + .NET Core Demos | Radu VunvuleaDocker + .NET Core Demos | Radu Vunvulea
Docker + .NET Core Demos | Radu Vunvulea
 

Ähnlich wie Vunvulea radu it camp-ro 2012 - building metro style applications on windows 8 using background tasks

ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012
ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012
ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012ITCamp
 
ITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
ITCamp 2012 - Paula Januszkiewicz - Stronghold to StrengthenITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
ITCamp 2012 - Paula Januszkiewicz - Stronghold to StrengthenITCamp
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Enea Gabriel
 
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSMihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSITCamp
 
ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...
ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...
ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...ITCamp
 
ITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interopITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interopITCamp
 
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep diveITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep diveITCamp
 
ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...
ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...
ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...ITCamp
 
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows AdministratorsITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows AdministratorsITCamp
 
ITCamp 2013 - Petru Jucovschi - Application ecosystems
ITCamp 2013 - Petru Jucovschi - Application ecosystemsITCamp 2013 - Petru Jucovschi - Application ecosystems
ITCamp 2013 - Petru Jucovschi - Application ecosystemsITCamp
 
ItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-Cardasim
ItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-CardasimItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-Cardasim
ItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-CardasimFlorin Cardasim
 
NXP'S-PORTFOLIO-FOR-ADDRESSING-IOT-SECURITY.pdf
NXP'S-PORTFOLIO-FOR-ADDRESSING-IOT-SECURITY.pdfNXP'S-PORTFOLIO-FOR-ADDRESSING-IOT-SECURITY.pdf
NXP'S-PORTFOLIO-FOR-ADDRESSING-IOT-SECURITY.pdfssuser57b3e5
 
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per dayITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per dayITCamp
 
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challengeITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challengeITCamp
 
How to Tackle the Single Sign-On Challenge in 2012
How to Tackle the Single Sign-On Challenge in 2012How to Tackle the Single Sign-On Challenge in 2012
How to Tackle the Single Sign-On Challenge in 2012Mihai Dan Nadas
 
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitchITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitchITCamp
 
ITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile appsITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile appsITCamp
 
ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#
ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#
ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#ITCamp
 
ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance Tools
ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance ToolsITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance Tools
ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance ToolsITCamp
 
ITCamp 2012 - Florin Cardasim - HTML5 web-sockets
ITCamp 2012 - Florin Cardasim - HTML5 web-socketsITCamp 2012 - Florin Cardasim - HTML5 web-sockets
ITCamp 2012 - Florin Cardasim - HTML5 web-socketsITCamp
 

Ähnlich wie Vunvulea radu it camp-ro 2012 - building metro style applications on windows 8 using background tasks (20)

ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012
ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012
ITCamp 2011 - Adrian Stoian - System Center Configuration Manager 2012
 
ITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
ITCamp 2012 - Paula Januszkiewicz - Stronghold to StrengthenITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
ITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
 
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSMihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
 
ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...
ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...
ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...
 
ITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interopITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interop
 
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep diveITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
 
ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...
ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...
ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...
 
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows AdministratorsITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
 
ITCamp 2013 - Petru Jucovschi - Application ecosystems
ITCamp 2013 - Petru Jucovschi - Application ecosystemsITCamp 2013 - Petru Jucovschi - Application ecosystems
ITCamp 2013 - Petru Jucovschi - Application ecosystems
 
ItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-Cardasim
ItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-CardasimItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-Cardasim
ItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-Cardasim
 
NXP'S-PORTFOLIO-FOR-ADDRESSING-IOT-SECURITY.pdf
NXP'S-PORTFOLIO-FOR-ADDRESSING-IOT-SECURITY.pdfNXP'S-PORTFOLIO-FOR-ADDRESSING-IOT-SECURITY.pdf
NXP'S-PORTFOLIO-FOR-ADDRESSING-IOT-SECURITY.pdf
 
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per dayITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
 
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challengeITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
 
How to Tackle the Single Sign-On Challenge in 2012
How to Tackle the Single Sign-On Challenge in 2012How to Tackle the Single Sign-On Challenge in 2012
How to Tackle the Single Sign-On Challenge in 2012
 
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitchITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
 
ITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile appsITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile apps
 
ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#
ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#
ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#
 
ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance Tools
ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance ToolsITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance Tools
ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance Tools
 
ITCamp 2012 - Florin Cardasim - HTML5 web-sockets
ITCamp 2012 - Florin Cardasim - HTML5 web-socketsITCamp 2012 - Florin Cardasim - HTML5 web-sockets
ITCamp 2012 - Florin Cardasim - HTML5 web-sockets
 

Kürzlich hochgeladen

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Kürzlich hochgeladen (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Vunvulea radu it camp-ro 2012 - building metro style applications on windows 8 using background tasks

  • 1. Building metro style applications on Windows 8 using background task Radu Vunvulea iQuest http://vunvulearadu.blogspot.com Twitter: @RaduVunvulea @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 2. Mobile & ITCamp 2012 sponsors Development @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 3. Mobile & Agenda Development • Why we need background tasks • Base concepts • When to use them • Triggers • Conditions • Notifications • Demo • Tips and Tricks • Q&A @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 4. Mobile & Why we need background tasks Development • What happens with classic applications? • Where Windows Services vanish? • Why do I need background tasks? @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 5. Mobile & Why we need background tasks Development • What happens with classic applications? • Where Windows Services vanish? • Why do I need background tasks? @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 6. Mobile & Windows Metro Applications Development • Similar to Windows Phone applications • Only threads from the current application (foreground) are running @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 7. Mobile & Background tasks Development • Running code in background • The background task doesn’t depend on application state • Small work items • No interaction with UI • What we gain: – Smooth user experience – Long battery life @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 8. Mobile & Background task types Development • System – Playback manager – Push notification – Background transfer API • Upload files • Download files • User-defined – Almost any type of custom action @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 9. Mobile & When to use them Development • Receive chat message • Process an incoming SMS • Download email • Display a toast notification • Execute action when something changes • Display UI, play music • Process photos • Index data @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 10. Mobile & Background task triggers Development ControlChannelTrigger ServicingComplete InternetAvailable SessionConnected InternetNotAvailable SessionDisconnected LockScreenApplicationAdded SessionStart LockScreenApplicationRemoved SmsReceived MaintenanceTrigger TimeTrigger NetworkNotificationChannelReset TimeZoneChange NetworkStateChange UserAway OnlineIdConnectedStateChange UserPresent PushNotificationTrigger @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 11. Mobile & Background task triggers Development ControlChannelTrigger ServicingComplete InternetAvailable SessionConnected InternetNotAvailable SessionDisconnected LockScreenApplicationAdded SessionStart LockScreenApplicationRemoved SmsReceived MaintenanceTrigger TimeTrigger NetworkNotificationChannelReset TimeZoneChange NetworkStateChange UserAway OnlineIdConnectedStateChange UserPresent PushNotificationTrigger @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 12. Mobile & Background task triggers Development • Some triggers require the application to be on the lock screen ControlChannelTrigger ServicingComplete InternetAvailable SessionConnected InternetNotAvailable SessionDisconnected LockScreenApplicationAdded SessionStart LockScreenApplicationRemoved SmsReceived MaintenanceTrigger TimeTrigger NetworkNotificationChannelReset TimeZoneChange NetworkStateChange UserAway OnlineIdConnectedStateChange UserPresent PushNotificationTrigger • An application can register to be notified when it is added or removed from lock screen @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 13. Mobile & Background task conditions Development • 0..n conditions can be added to each background task • Only when all conditions are met, the given task is launched Background task condition The condition that must be satisfied InternetAvailable The Internet must be available. InternetNotAvailable The Internet must be unavailable. SessionConnected The session must be connected. SessionDisconnected The session must be disconnected. UserNotPresent The user must be away. UserPresent The user must be present. @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 14. Mobile & Background task infrastructure Development Application System 4. Launch background task System My Application 3. Fire trigger 2. Register class with triggers Control Channel Control Channel 1. Register trigger Trigger Trigger @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 15. Mobile & Where a background task run Development Application BackgroundTaskHost.exe Application or BackgroundTaskHost.exe @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 16. Mobile & Where a background task run Development TimeTrigger SystemTrigger ControlChannelTrigger MaintenanceTrigger Application BackgroundTaskHost.exe Application or BackgroundTaskHost.exe PushNotificationTrigger @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 17. Mobile & Notifications Development • The following notification can send to the base application: – Progress notifications – Completion notifications – Exceptions thrown • A background task can be receive cancellations notifications only from operating system – The task have 5s to save his state until the system close the application @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 18. Mobile & Basic steps to implement Development • JavaScript – Add a new dedicated worker file • C#/C++ – Add a new Windows 8 Metro style app class library project to the solution. – Add a reference to the newly added class library project in the main Windows 8 Metro style app project that registers the background tasks. – Ensure that the output type of the class library is Winmd and not DLL. – Add the required manifest entries for background tasks to the Windows 8 Metro style app – Seal the class that implements the IBackgroundTask @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 19. Mobile & Base classes Development • IBackgroundTask – used to implement the background task • IBackgroundTaskInstance – provides access to a background task instance • BackgroundTaskDeferral – used for async calls from background task • BackgroundTaskBuilder – used to register a background task • BackgroundTaskRegistration – a background class that was registered • BackgroundTaskRegistration.AllTasks – get a list of tasks of the current application @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 20. Mobile & Live demo Development @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 21. Mobile & CPU resource constrains Development • Limited CPU time for each application • Use BackgroundTaskDeferral for async calls CPU resource quota Refresh period Lock screen app 2 CPU seconds 15 minutes Non-lock screen app 1 CPU second 2 hours • Restrictions are applied on AC power also • Exceptions: – Control channel – Push notifications @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 22. Mobile & Network resource constraints Development • Different network interfaces require different amount of energy • Wi-Fi resource constraints: Average Data throughput, in megabytes (MB) Data throughput, in MB, for non-lock throughput for lock screen apps screen apps Every 15” Per day Every 2 hours Per day 1 Mbps 0.1875 18 0.25 3 10 Mbps 1.875 180 2.5 30 20 Mbps 3.75 360 5 60 • On AC power there is no limitation for Wi-Fi network @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 23. Mobile & Tips and tricks Development • TimeTrigger minimum time interval is 15 minutes • Progress and Complete handlers needs to be associated each time when application start • BackgroundTaskDeferral can be used for async calls • Don’t rely on global pool when all allocated CPU time was used • When a background task is suspended a message is logged in the Event Viewer. • Share data between application and background task only by files or State Manager @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 24. Mobile & Best practices Development • Design background tasks to be short lived • Use persistent storage to share data between the background task and the app • Verify if the app needs to be on the lock screen • Do not display UI other than toast, tiles or badges from a background task. • Do not rely on user interaction in background tasks @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 25. @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 26. THE END Radu Vunvulea iQuest http://vunvulearadu.blogspot.com Twitter: @RaduVunvulea @ itcampro # itcamp12 Premium conference on Microsoft technologies