The State and Notification Broker provides APIs that allow developers to monitor over 100 system states from managed code, react to changes in those states, and create custom states. It provides a consistent model for accessing and managing system states without using P/Invoke. Developers can read states like battery level and be notified of changes to react to in their applications, such as disabling buttons when battery is low. The broker also allows applications to launch when a monitored state changes.
1 of 19
Download to read offline
More Related Content
Real World State And Notification Broker
1. Real World State and Notification BrokerMichele LocuratoloIn collaborazione con
2. AgendaWhat is the State and Notification BrokerReading a System StateReacting to changesApplication launcher
3. 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
4. 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)
14. 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
16. RemarksYou can start directly when a state changesSystemStatemonitoredState = 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 doesnt match with the criteria
17. 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