Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Event publish and dispatch

Events can be generated from several sources, including the device environment (key presses , etc.) or from the system (battery level warning, etc.). Since these services post events without knowledge of which clients are receiving the events, a mechanism is required to send the event to the appropriate subscribers.

The publishing of events from services, the system, or device environment, is handled through the AEE Shell and the event registry. The shell receives the events as native event codes and then posts them to the event registry. The registry then publishes the event to each subscribing service.

When the subscriber receives the event, the HandleEvent() function receives the event as an event code along with other contextual data. The subscriber then processes the event in the application's main event loop.