SlideShare a Scribd company logo
Real World State and Notification BrokerMichele LocuratoloIn collaborazione con
AgendaWhat is the State and Notification BrokerReading a System StateReacting to changesApplication launcher
What is the State and Notification Broker:Il a set of API which allow developers to:Monitoring the System State in managed code:We have more then 100 states exposedReact on system state changesCreate custom states
Now we have:A consistent model to access and manage the system statesNo P/Invoke! 100% Managed code!A lot of states exposed (more then 100)
A BIG difference
Read the battery stateDEMO
Reacting to a changesCreate an instance of the specific stateRegister to the .Changes eventImplement your code 
React to the battery state changesDEMO
How we can use it (in a real world scenario)?We can:Disable  buttons /menu when the battery strength is lowSend data before battery goes down…
ActiveSyncStatusPhoneCallForwardingOnLine1CradlePresentMessagingMmsUnreadMessagingOtherEmailUnreadMessagingLastEmailAccountNameMessagingTotalEmailUnreadPhoneLastIncomingCallerNameMediaPlayerTrackGenreMediaPlayerTrackTitleHeadsetPresentPhoneIncomingCallerNumberConnectionsVpnDescriptionsMessagingSmsUnreadPhoneIncomingCallerNameKeyboardPresentPhoneSimFullWiFiStateConnectedMessagingVoiceMailTotalUnreadOwnerNameConnectionsProxyCountPhoneCallOnHoldPhoneActiveCallCountMediaPlayerTrackArtistWiFiStatePowerOnTasksActivePhoneMissedCallCalendarEventBusyStatusMessagingActiveSyncAccountNameDisplayRotationPhoneCallCallingPhoneCallBarringPhoneActiveDataCallCameraPresentPhoneBlockedSimPhoneIncomingCallerContactPhoneGprsCoverageWiFiStateNetworksAvailablePhoneMissedCallsConnectionsCountPhone1xRttCoverageTasksHighPriorityPhoneIncomingCallerContactPropertyName
Behind the scenes:The Windows Mobile Registry is the central repository:SystemState: for the predefined statesRegistryState: for the custom  state
Creating your own state:Crate an instance of the RegistryState ClassReact to the changes like the classic SystemState
Create your own stateDEMO
Application LauncherStart an application when a monitored state changesStateBase implements IApplicationLaucher interfaceThe IApplicationLaucher has the capability to start an applicationInformation about the application to start are stored in the Registry
ApplicationLauncherDEMO
RemarksYou can start directly when a state changes…SystemStatemonitoredState = newSystemState(SystemProperty.PowerBatteryBackupStrength);monitoredState.EnableApplicationLauncher("MyCoolApp");…or when a state arrives to a specified valueSystemStatemonitoredState = new SystemState(SystemProperty.PowerBatteryBackupStrength);monitoredState.ComparisonType = StatusComparisonType.Less;monitoredState.ComparisonValue = BatteryLevel.Low;monitoredState.EnableApplicationLauncher("MyCoolApp");The second application is not running before the state value doesn’t match with the criteria
In conclusion….Windows Mobile exposes more then 100 different statesWhen you need to interact with any kind of system notifications, check the System StatesYou can create your own stateUse the S&N API to produce a better softwareCheck out this open source application which uses this APIshttp://www.codeplex.com/MobilePhoneAssistant
ActiveSyncStatusPhoneCallForwardingOnLine1CradlePresentMessagingMmsUnreadMessagingOtherEmailUnreadMessagingLastEmailAccountNameMessagingTotalEmailUnreadPhoneLastIncomingCallerNameMediaPlayerTrackGenreMediaPlayerTrackTitleHeadsetPresentPhoneIncomingCallerNumberConnectionsVpnDescriptionsMessagingSmsUnreadPhoneIncomingCallerNameKeyboardPresentPhoneSimFullWiFiStateConnectedMessagingVoiceMailTotalUnreadOwnerNameConnectionsProxyCountPhoneCallOnHoldPhoneActiveCallCountMediaPlayerTrackArtistWiFiStatePowerOnTasksActivePhoneMissedCallCalendarEventBusyStatusMessagingActiveSyncAccountNameDisplayRotationPhoneCallCallingPhoneCallBarringPhoneActiveDataCallCameraPresentPhoneBlockedSimPhoneIncomingCallerContactPhoneGprsCoverageWiFiStateNetworksAvailablePhoneMissedCallsConnectionsCountPhone1xRttCoverageTasksHighPriorityPhoneIncomingCallerContactPropertyName
Link17/01/2008www.xedotnet.org19Michele Locuratolohttp://www.michelelocuratolo.commichele@locuratolo.comhttp://www.michelelocuratolo.comTwitter.com/mighell

More Related Content

PPT
TuAnalyze screenshots
Diabetes Hands Foundation
 
PPTX
Design patterns
ISsoft
 
PPTX
Slverlight Networking (Andrea Boschin)
XeDotNet
 
PPTX
ASP.NET 4.0
XeDotNet
 
PPTX
Codice di qualità con VS2010 (TDD)
XeDotNet
 
PPTX
Windows Embedded, Segreti E Misteri Delle Piattaforme
XeDotNet
 
PPTX
Silverlight 4
XeDotNet
 
TuAnalyze screenshots
Diabetes Hands Foundation
 
Design patterns
ISsoft
 
Slverlight Networking (Andrea Boschin)
XeDotNet
 
ASP.NET 4.0
XeDotNet
 
Codice di qualità con VS2010 (TDD)
XeDotNet
 
Windows Embedded, Segreti E Misteri Delle Piattaforme
XeDotNet
 
Silverlight 4
XeDotNet
 

Recently uploaded (20)

PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
The Future of Artificial Intelligence (AI)
Mukul
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Ad
Ad

Real World State And Notification Broker

Editor's Notes

  • #3: Chiedere quanti conoscono S&N e quanti lo hanno già usato
  • #5: In the past, system states non exposedasmanagedP/InvokesrequiredInconsistentAPIstoretrieve System States
  • #6: Marcare sulla congruenza del modello di accesso agli stati
  • #7: Battery: semplice lettura di uno stato
  • #9: Battery
  • #10: Dire alla fine:Remember…we have more than 100 states
  • #12: HKLMSystemState: general stateHKCUSystemState: user state (likeappointments)Mostrare il registro con Remote RegistryEditor
  • #14: Battery
  • #15: PersistentNotificationThe previuos (and verysimple) demo helps me to introduce the PersistentNotification.
  • #16: Battery
  • #17: Sulpunto 1, fare l’esempiodellechiamateentranti e che è possibileavviareil software solo se un determinatochiamantestàchiamando!