SHOW Signed
 

net.rim.device.api.notification
Interface Consequence

All Superinterfaces:
NotificationsConstants

public interface Consequence
extends NotificationsConstants

The Consequence interface responds to notification events.

A Consequence object MUST implement the SyncConverter interface (net.rim.device.api.synchronization.SyncConverter)

Each registered Consequence object is invoked whenever a notification for a new event should commence and terminate. The consequence object can carry out any necessary action for the given conditions. Typically Consequence implementations will notify the user of the event, however, the implementation may, for example, choose to merely log the received event.

Examples of notification events include vibration, tunes and the blinking of LED.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

Since:
3.6

Field Summary
 
Fields inherited from interface net.rim.device.api.notification.NotificationsConstants
CALLERID_ADDRESSCARD_UID, CASUAL, CONTINUOUS_REPEAT, CRITICAL, CUSTOM_TUNE_NAME, DEFAULT_LEVEL, FORCE_NO_REPEAT_NOTIFICATIONS_FLAG, FORCED, IMPORTANT, IN_HOLSTER_ENGINE_STATE, MANUAL_TRIGGER, NO_RELATED_SOURCE, NO_SOURCE, NOTIFICATION_LEVEL_KEY, NOTIFICATION_PRIVATE_FLAG_KEY, NOTIFICATION_REPEAT_COUNT, NOTIFICATION_REPEAT_DELAY, OUT_OF_HOLSTER_ENGINE_STATE, OUT_OF_HOLSTER_TRIGGER, SENSITIVE, STOP_CONDITIONS
 
Method Summary
 Category: Signed  Object newConfiguration(long consequenceID, long sourceID, byte profileIndex, int level, Object context)
          The framework calls this method to extract a particular cookie object appropriate for the sourceID provided.
 Category: Signed  void startNotification(long consequenceID, long sourceID, long eventID, Object configuration, Object context)
          Invoked when a new event occurs and notification should commence.
 Category: Signed  void stopNotification(long consequenceID, long sourceID, long eventID, Object configuration, Object context)
          Invoked when notification for an event should stop.
 

Method Detail

newConfiguration

public Object newConfiguration(long consequenceID,
                               long sourceID,
                               byte profileIndex,
                               int level,
                               Object context)
The framework calls this method to extract a particular cookie object appropriate for the sourceID provided.

This cookie object is later passed back to the consquence object in the start and stop calls.

Implementation Note: Currently, this object MUST implement the SyncObject AND Persistable interfaces

Parameters:
consequenceID - Identifier of the consequence for which a configuration is needed.
sourceID - Identifier of the source object being configured.
profileIndex - Index of the profile under which the object is being configured.
level - UI interactivity level at which the source object was registered.
context - Optional context for the operation.
Returns:
Consequence-specific configuration object.
Since:
3.6
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

startNotification

public void startNotification(long consequenceID,
                              long sourceID,
                              long eventID,
                              Object configuration,
                              Object context)
Invoked when a new event occurs and notification should commence.
Parameters:
conseqeunceID - Identifier of the consequence to trigger (to permit a single object instance to handle multiple consequences)
sourceID - Identifier of the source which triggered the notification.
eventID - Application-specific event identifier.
configuration - Optional configuration object.
context - Optional context for the operation.
Since:
3.6
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

stopNotification

public void stopNotification(long consequenceID,
                             long sourceID,
                             long eventID,
                             Object configuration,
                             Object context)
Invoked when notification for an event should stop.
Parameters:
consequenceID - Identifier of the consequence.
sourceID - Identifier of the source.
eventID - Application-specific event identifier.
configuration - Optional configuration object.
context - Optional context for the operation.
Since:
3.6
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.



Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.