Featured interfaces


This interface provides methods to manage UI notifications. If you want the notification to display any UI components when the notification occurs, you must define these UI events in the implementation of this interface. If you do not want to start any UI events, you do not need to implement this interface. For example, if you only want the event to cause the LED light of the BlackBerry® device to flash, you do not need to implement this interface.

This interface provides the following three methods that you can use to display a UI notification, depending on the state of the BlackBerry device:

  • the deferredEventWasSuperseded() method is invoked when another event that has the same or greater level occurs after this event
  • the notificationsEngineStateChanged() method is invoked when the state of the notifications engine has changed, for example, if the BlackBerry device has been removed from the holster
  • the proceedWithDeferredEvent() method is invoked when the NotificationsEngineListener is free to proceed with the event

The sample application displays a dialog box with the message "Notification for event id: event_id" when proceedWithDeferredEvent() is invoked. Note that if this event is never superseded by another notification event, this method is invoked when the event starts. To handle the case that this event was superseded and is resuming, the sample application uses the boolean class variable _dialogShowing to determine if the dialog box has already been created and displayed. This variable prevents multiple dialog boxes from being created and displayed for the same event.

For the remaining two methods, the sample application just displays text alerting the user that the event has been superseded or the state of the notifications engine has changed for deferredEventWasSuperseded() and notificationsEngineStateChanged()respectively.


This interface provides methods to manage the starting and stopping of notification events. This interface provides the methods startNotification() and stopNotification() methods which specify the actions for the BlackBerry device to take when an event begins and ends. The methods startNotification() and stopNotification() methods use a Configuration object to perform context-specific functions. For example, the Configuration object might contain data that includes notification settings that the user has set on the BlackBerry device.

The sample application just provides a trivial Conifguration object that does not affect the startNotification() and stopNotification() methods.


This interface implements the method getUID() which provides the unique ID of the synchronizable object in a SyncCollection.

In the sample application, no data is being synchronized so this method just returns 0.


This interface implements two convert() methods for converting a SyncObject to a serialized form and for converting a serialized form to a SyncObject. The serializable form is required before data can be sent over the wireless network.

The sample application converts the Configuration object to be sent by writing it to a DataBuffer with a header specifying its type and length. The sample application also converts an object that it received into a Configuration object.

Next topic: Featured classes
Previous topic: Overview

Was this information helpful? Send us your comments.