[This is preliminary documentation and subject to change.]
Order is important: applications should always perform the stages of an alert in the following order:
The same thing is repeated if and when the object is changed to no longer be in the alert state. For example, when the battery indicator icon changes to yellow, its STATE_SYTEM_ALERT_MEDIUM flag is set, and the EVENT_SYSTEM_ALERTLEVELCHANGE message has been sent referencing this icon object. When the indicator changes back to green, its STATE_SYSTEM_ALERT_MEDIUM flag is cleared (so that none of the alert flags are set), and another EVENT_SYSTEM_ALERTLEVELCHANGE message is sent. A client receives this event, checks the icon object's state flags, finds that none are set, and realizes that this notification indicated that the alert level on this object has completed.