SlideShare a Scribd company logo
Session III – Lifecycle and More
Daryl Rudolph
Agenda
Application
Lifecycle
Live
Tiles, Background
Process and
Lock Screen
Implementing the
Search Contract
Application Lifecycle
Show the flow
Feel Connected and
Alive
Memory Management
User selects app for foreground
System manages app lifetime
User launches many apps
User manages app lifetime
App process lifetime
Application States
Running
SuspendedNot Running
Resuming
Activated Suspending
Process lifetime walkthrough
When do apps get terminated
• System needs more memory
• User switch occurs
• System shutdown
• Apps crash
Apps do not get notified when
they are getting terminated
Process state transitions
5seconds
not
User
Launche
s App
Splash
screen
Suspend under the hood
• Suspended apps are not scheduled by the NT Kernel
• No CPU, Disk or Network consumed
• All threads are suspended
• Apps remain in memory
• Kernel ensures apps are not suspended in critical
sections that could cause system wide deadlocks
• Apps instantly resumed from suspend when brought to
foreground
Interacting with your users
App Activation Through Contracts
• Apps are activated through contracts
• Launch, search, ShareTarget, etc.
• Apps need to initialize contract specific actions
• Context is provided
Running App
launch
shareTarget
activated
kind
search
App crash? Start over
• Apps that are stuck are no fun
• Your app can be terminated abruptly in any of these
cases
• Too long to load
• Too long to suspend
• Stopped handling input messages (Blocking I/O on UI thread)
• Task manager
• Bring the user back home, and ignore saved user
session state
• previousExecutionState is provided in activation event
args
Best practices for saving and restoring state
Scenario You should….
User is using your
App
• Save user data incrementally
App switched away
from (Suspending)
• Save where the user is – what
screen they are on, for example
Not running App
launched by user
(Activated)
• Bring the user back and restore
their session as if they never left
Suspended App
launched by user
(Resuming)
• Do nothing
Demo
Suspend Demo
Search Contract
Finding your application
Use the Right
Contracts
Search 1 2 3
1. Search box is scoped to the
main app on screen
2. Query suggestions provided by
the main app on screen
• Autocompletes to terms for which
the app has search results
3. List of installed Windows 8 style
apps that have implemented the
search contract
Query submitted
User
Show Search
results view
Show previous
search results
view
Search Pane
Submit query to
App
Search App
Query Submitted
Event
Demo
Search Contract Demo
Live tiles
Keep the action going
Invest in a Great Tile
Badges
• Overlays status on top of tile
• Supports square and wide tiles
• Number up to 99 or pre-defined glyph:
• Always legible on top of images
BadgeBadge
Notification Queuing
• By default only last notification shown
• Opt-in to automatically cycle tile through last five
notifications
Live Tiles things to remember
• Tiles updated using pre-defined templates
• Text-only, image-only or combination
• JPEG or PNG only, max size 150 KB
• Local, cloud or background updates
Invest in a Great Tile
Demo
Live Tiles
Secondary Tiles
• Tiles created by “pinning” content from
app
• Pin initiated by app via simple runtime
call
• User confirms pin operation via system UI
• Exposes a personalized surface for app
• Same capabilities as app tiles
• Launch leads to relevant content
Demo
Secondary Tiles
RTC – Real Time Communication apps
Keep the action going
Invest in a Great Tile
Review app process lifetime
…with RTC appsThe app lifecycle
Network Trigger
RTC trigger APIs
System Trigger Time Trigger
Background Task Infrastructure
VoIP IM Your App
App OS
Network
Trigger
System
Trigger
Time
Trigger
Background Task Infrastructure
VoIP IM Mail
Changing Live Tile
Time
Trigger
Setting up a Time Trigger
Live tiles with push notifications
• Tiles can be updated even if
your app is not running!
• Push notifications can be used
to remotely update a tile on
the Start screen
• Great for showing the newest
content available to your users
App Cloud Service
Windows Push
Notification Service
(WNS)
HTTP POST
Notification
Delivered
Push Notification Overview
Notificatio
n
Client
Platform
App Service
Windows Push
Notification
Service
POST <channel URI> HTTP/1.1
Content-Type: text/xml
Host: db3.notify.windows.com
X-WNS-Type: wns/badge
Authorization: Bearer <authentication
token>
Content-Length: 58
<?xml version="1.0" encoding="utf-8"?>
<badge value="11"/>
Time
Trigger
using Windows.ApplicationModel.Background;
// Specify the trigger
TimeTrigger trigger = new TimeTrigger(UpdateInterval, Periodic);
Create time
trigger
// Associate app code with the trigger
BackgroundTaskBuilder taskBuilder = new BackgroundTaskBuilder();
taskBuilder.TaskEntryPoint = “MyApp.Background.UpdateEmailTask";
taskBuilder.SetTrigger(trigger);
taskBuilder.Name = “TimerExpiry";
Associate
trigger with
app code
// Register the task for background execution
IBackgroundTaskRegistration taskRegistration =
taskBuilder.Register();
Register
trigger
public sealed class UpdateLiveTileTask : IBackgroundTask {
public void Run(IBackgroundTaskInstance
taskInstance)
{
// Your app code to update email
}
}
}
using Windows.ApplicationModel.Background;
Time
Trigger
Demo
Live Tiles /Lock
Screen/Background
Best Practices for Tiles
• Display new, tailored and engaging content to the user
• Keep tile fresh by updating as your app content
changes
• Reference content that lives on your app’s
home page so the user can find it easily.
• Keep content safely ignorable and glanceable - for short
messages only
• Use square size if tile is not live
• No display ads! 
Agenda
Application
Lifecycle
Live Tiles,
Background
Process and
Lock Screen
Implementing the
Search Contract
Hands-On Lab 3 OR Create your own app
Running in the background
Create your own app
• You can work on Hands-on Lab 3 OR Create your own
app
• You have until 4:20 PM
• Don’t have to decide if you are entering until 4:20 PM
• Presentation can be PowerPoint and/or demonstration
• Must let me know beforehand if you don’t have VGA
connection
• Each contestant will have exactly 3 minutes to present!
• Be creative. Keep in mind the traits of a great Windows
8 app!
• Note: Anyone who attended today can enter to win the
app contest sponsored by Component Art for a $10,000
grand prize, even if you don’t enter today’s contest.
Contact/References
• Magenic – http://www.magenic.com
• Daryl Rudolph – darylr@magenic.com
• http://dev.windows.com
• http://design.windows.com
• API Sites
• http://www.restfulwebservices.net
• http://developer.mashery.com/apis
• http://www.programmableweb.com

More Related Content

Viewers also liked

Windows 8 DevUnleashed - Session 2
Windows 8 DevUnleashed - Session 2Windows 8 DevUnleashed - Session 2
Windows 8 DevUnleashed - Session 2drudolph11
 
Iot
IotIot
Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1drudolph11
 
Utilisation des capteurs dans les applications windows 8
Utilisation des capteurs dans les applications windows 8Utilisation des capteurs dans les applications windows 8
Utilisation des capteurs dans les applications windows 8
Intel Developer Zone Community
 
Humix Introduction 0528
Humix Introduction 0528Humix Introduction 0528
Humix Introduction 0528
Jeffrey Liu
 
NFC & The Growth of Connected Consumer Electronics Devices
NFC & The Growth of Connected Consumer Electronics DevicesNFC & The Growth of Connected Consumer Electronics Devices
NFC & The Growth of Connected Consumer Electronics Devices
NFC Forum
 
Window architecture
Window architecture Window architecture
Window architecture
IGZ Software house
 

Viewers also liked (7)

Windows 8 DevUnleashed - Session 2
Windows 8 DevUnleashed - Session 2Windows 8 DevUnleashed - Session 2
Windows 8 DevUnleashed - Session 2
 
Iot
IotIot
Iot
 
Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1
 
Utilisation des capteurs dans les applications windows 8
Utilisation des capteurs dans les applications windows 8Utilisation des capteurs dans les applications windows 8
Utilisation des capteurs dans les applications windows 8
 
Humix Introduction 0528
Humix Introduction 0528Humix Introduction 0528
Humix Introduction 0528
 
NFC & The Growth of Connected Consumer Electronics Devices
NFC & The Growth of Connected Consumer Electronics DevicesNFC & The Growth of Connected Consumer Electronics Devices
NFC & The Growth of Connected Consumer Electronics Devices
 
Window architecture
Window architecture Window architecture
Window architecture
 

Similar to Windows 8 DevUnleashed - Session 3

Windows 8 BootCamp
Windows 8 BootCampWindows 8 BootCamp
Windows 8 BootCamp
Einar Ingebrigtsen
 
08.Push Notifications
08.Push Notifications 08.Push Notifications
08.Push Notifications
Nguyen Tuan
 
A look behind the scenes: Windows 8 background processing
A look behind the scenes: Windows 8 background processingA look behind the scenes: Windows 8 background processing
A look behind the scenes: Windows 8 background processing
Matt Lacey
 
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
Postman
 
Windows 8 Client Part 2 "The Application internals for IT-Pro's"
Windows 8 Client Part 2 "The Application internals for IT-Pro's"  Windows 8 Client Part 2 "The Application internals for IT-Pro's"
Windows 8 Client Part 2 "The Application internals for IT-Pro's"
Microsoft TechNet - Belgium and Luxembourg
 
Developing on Windows 8
Developing on Windows 8Developing on Windows 8
Developing on Windows 8
Einar Ingebrigtsen
 
Android Trainning Session 2
Android Trainning  Session 2Android Trainning  Session 2
Android Trainning Session 2
Shanmugapriya D
 
Data Transfer between activities and Database
Data Transfer between activities and Database Data Transfer between activities and Database
Data Transfer between activities and Database
faiz324545
 
Syncitall
SyncitallSyncitall
Syncitall
Aakash Praliya
 
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications QIRIS
 
Best android classes in mumbai
Best android classes in mumbaiBest android classes in mumbai
Best android classes in mumbai
Vibrant Technologies & Computers
 
Android overview
Android overviewAndroid overview
Android overview
Mostofa Kamal Rasel Rasel
 
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
PROIDEA
 
Windows Phone 8 - 8 Tiles and Lock Screen Notifications
Windows Phone 8 - 8 Tiles and Lock Screen NotificationsWindows Phone 8 - 8 Tiles and Lock Screen Notifications
Windows Phone 8 - 8 Tiles and Lock Screen NotificationsOliver Scheer
 
Live Tiles and Notifications in Windows Phone
Live Tiles and Notifications in Windows PhoneLive Tiles and Notifications in Windows Phone
Live Tiles and Notifications in Windows Phone
Dave Bost
 
Windows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background AgentsWindows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background AgentsOliver Scheer
 
Mdm with config mgr nico
Mdm with config mgr nicoMdm with config mgr nico
Mdm with config mgr nicoKenny Buntinx
 

Similar to Windows 8 DevUnleashed - Session 3 (20)

Windows 8 BootCamp
Windows 8 BootCampWindows 8 BootCamp
Windows 8 BootCamp
 
08.Push Notifications
08.Push Notifications 08.Push Notifications
08.Push Notifications
 
A look behind the scenes: Windows 8 background processing
A look behind the scenes: Windows 8 background processingA look behind the scenes: Windows 8 background processing
A look behind the scenes: Windows 8 background processing
 
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
 
Windows 8 Client Part 2 "The Application internals for IT-Pro's"
Windows 8 Client Part 2 "The Application internals for IT-Pro's"  Windows 8 Client Part 2 "The Application internals for IT-Pro's"
Windows 8 Client Part 2 "The Application internals for IT-Pro's"
 
Developing on Windows 8
Developing on Windows 8Developing on Windows 8
Developing on Windows 8
 
Android Trainning Session 2
Android Trainning  Session 2Android Trainning  Session 2
Android Trainning Session 2
 
Data Transfer between activities and Database
Data Transfer between activities and Database Data Transfer between activities and Database
Data Transfer between activities and Database
 
Syncitall
SyncitallSyncitall
Syncitall
 
Google app engine
Google app engineGoogle app engine
Google app engine
 
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
 
Best android classes in mumbai
Best android classes in mumbaiBest android classes in mumbai
Best android classes in mumbai
 
Android overview
Android overviewAndroid overview
Android overview
 
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
4Developers 2018: Zero-Downtime deployments with Kubernetes (Mateusz Dymiński)
 
Android by Swecha
Android by SwechaAndroid by Swecha
Android by Swecha
 
Windows Phone 8 - 8 Tiles and Lock Screen Notifications
Windows Phone 8 - 8 Tiles and Lock Screen NotificationsWindows Phone 8 - 8 Tiles and Lock Screen Notifications
Windows Phone 8 - 8 Tiles and Lock Screen Notifications
 
Live Tiles and Notifications in Windows Phone
Live Tiles and Notifications in Windows PhoneLive Tiles and Notifications in Windows Phone
Live Tiles and Notifications in Windows Phone
 
Windows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background AgentsWindows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background Agents
 
Mdm with config mgr nico
Mdm with config mgr nicoMdm with config mgr nico
Mdm with config mgr nico
 
Mdm with config mgr nico
Mdm with config mgr nicoMdm with config mgr nico
Mdm with config mgr nico
 

Recently uploaded

RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
Globus
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 

Recently uploaded (20)

RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 

Windows 8 DevUnleashed - Session 3

  • 1. Session III – Lifecycle and More Daryl Rudolph
  • 3. Application Lifecycle Show the flow Feel Connected and Alive
  • 4. Memory Management User selects app for foreground System manages app lifetime User launches many apps User manages app lifetime
  • 8. When do apps get terminated • System needs more memory • User switch occurs • System shutdown • Apps crash Apps do not get notified when they are getting terminated
  • 10. Suspend under the hood • Suspended apps are not scheduled by the NT Kernel • No CPU, Disk or Network consumed • All threads are suspended • Apps remain in memory • Kernel ensures apps are not suspended in critical sections that could cause system wide deadlocks • Apps instantly resumed from suspend when brought to foreground
  • 12. App Activation Through Contracts • Apps are activated through contracts • Launch, search, ShareTarget, etc. • Apps need to initialize contract specific actions • Context is provided Running App launch shareTarget activated kind search
  • 13. App crash? Start over • Apps that are stuck are no fun • Your app can be terminated abruptly in any of these cases • Too long to load • Too long to suspend • Stopped handling input messages (Blocking I/O on UI thread) • Task manager • Bring the user back home, and ignore saved user session state • previousExecutionState is provided in activation event args
  • 14. Best practices for saving and restoring state Scenario You should…. User is using your App • Save user data incrementally App switched away from (Suspending) • Save where the user is – what screen they are on, for example Not running App launched by user (Activated) • Bring the user back and restore their session as if they never left Suspended App launched by user (Resuming) • Do nothing
  • 16. Search Contract Finding your application Use the Right Contracts
  • 17. Search 1 2 3 1. Search box is scoped to the main app on screen 2. Query suggestions provided by the main app on screen • Autocompletes to terms for which the app has search results 3. List of installed Windows 8 style apps that have implemented the search contract
  • 18. Query submitted User Show Search results view Show previous search results view Search Pane Submit query to App Search App Query Submitted Event
  • 20. Live tiles Keep the action going Invest in a Great Tile
  • 21.
  • 22.
  • 23. Badges • Overlays status on top of tile • Supports square and wide tiles • Number up to 99 or pre-defined glyph: • Always legible on top of images BadgeBadge
  • 24. Notification Queuing • By default only last notification shown • Opt-in to automatically cycle tile through last five notifications
  • 25. Live Tiles things to remember • Tiles updated using pre-defined templates • Text-only, image-only or combination • JPEG or PNG only, max size 150 KB • Local, cloud or background updates Invest in a Great Tile
  • 27. Secondary Tiles • Tiles created by “pinning” content from app • Pin initiated by app via simple runtime call • User confirms pin operation via system UI • Exposes a personalized surface for app • Same capabilities as app tiles • Launch leads to relevant content
  • 29. RTC – Real Time Communication apps Keep the action going Invest in a Great Tile
  • 30. Review app process lifetime
  • 31. …with RTC appsThe app lifecycle
  • 32. Network Trigger RTC trigger APIs System Trigger Time Trigger Background Task Infrastructure VoIP IM Your App App OS
  • 33. Network Trigger System Trigger Time Trigger Background Task Infrastructure VoIP IM Mail Changing Live Tile Time Trigger Setting up a Time Trigger
  • 34. Live tiles with push notifications • Tiles can be updated even if your app is not running! • Push notifications can be used to remotely update a tile on the Start screen • Great for showing the newest content available to your users App Cloud Service Windows Push Notification Service (WNS) HTTP POST Notification Delivered
  • 35. Push Notification Overview Notificatio n Client Platform App Service Windows Push Notification Service POST <channel URI> HTTP/1.1 Content-Type: text/xml Host: db3.notify.windows.com X-WNS-Type: wns/badge Authorization: Bearer <authentication token> Content-Length: 58 <?xml version="1.0" encoding="utf-8"?> <badge value="11"/>
  • 36. Time Trigger using Windows.ApplicationModel.Background; // Specify the trigger TimeTrigger trigger = new TimeTrigger(UpdateInterval, Periodic); Create time trigger // Associate app code with the trigger BackgroundTaskBuilder taskBuilder = new BackgroundTaskBuilder(); taskBuilder.TaskEntryPoint = “MyApp.Background.UpdateEmailTask"; taskBuilder.SetTrigger(trigger); taskBuilder.Name = “TimerExpiry"; Associate trigger with app code // Register the task for background execution IBackgroundTaskRegistration taskRegistration = taskBuilder.Register(); Register trigger
  • 37. public sealed class UpdateLiveTileTask : IBackgroundTask { public void Run(IBackgroundTaskInstance taskInstance) { // Your app code to update email } } } using Windows.ApplicationModel.Background; Time Trigger
  • 39. Best Practices for Tiles • Display new, tailored and engaging content to the user • Keep tile fresh by updating as your app content changes • Reference content that lives on your app’s home page so the user can find it easily. • Keep content safely ignorable and glanceable - for short messages only • Use square size if tile is not live • No display ads! 
  • 41. Hands-On Lab 3 OR Create your own app Running in the background
  • 42. Create your own app • You can work on Hands-on Lab 3 OR Create your own app • You have until 4:20 PM • Don’t have to decide if you are entering until 4:20 PM • Presentation can be PowerPoint and/or demonstration • Must let me know beforehand if you don’t have VGA connection • Each contestant will have exactly 3 minutes to present! • Be creative. Keep in mind the traits of a great Windows 8 app! • Note: Anyone who attended today can enter to win the app contest sponsored by Component Art for a $10,000 grand prize, even if you don’t enter today’s contest.
  • 43. Contact/References • Magenic – http://www.magenic.com • Daryl Rudolph – darylr@magenic.com • http://dev.windows.com • http://design.windows.com • API Sites • http://www.restfulwebservices.net • http://developer.mashery.com/apis • http://www.programmableweb.com