| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.notification.NotificationsManager
public final class NotificationsManager
Manages the handling of events between applications and the notification engine. Keeps track of registered engine listeners as well as known consequence implementors.
| Field Summary | 
|---|
| Fields inherited from interface net.rim.device.api.notification.NotificationsConstants | 
|---|
CALLERID_ADDRESSCARD_UID, CASUAL, CONTINUOUS_REPEAT, CRITICAL, CUSTOM_TUNE_NAME, DEFAULT_LEVEL, FORCED, FORCE_NO_REPEAT_NOTIFICATIONS_FLAG, IGNORE_SENSOR_UPDATES, IMPORTANT, IN_HOLSTER_ENGINE_STATE, MANUAL_TRIGGER, NOTIFICATION_LEVEL_KEY, NOTIFICATION_PRIVATE_FLAG_KEY, NOTIFICATION_REPEAT_COUNT, NOTIFICATION_REPEAT_DELAY, NO_RELATED_SOURCE, NO_SOURCE, OUT_OF_HOLSTER_ENGINE_STATE, OUT_OF_HOLSTER_TRIGGER, SENSITIVE, STOP_CONDITIONS | 
| Method Summary | ||
|---|---|---|
 | 
static void | 
cancelAllDeferredEvents(long sourceID,
                        int triggerIndex,
                        Object context)
Cancels all events matching the source, level and trigger.  | 
 | 
static void | 
cancelDeferredEvent(long sourceID,
                    long eventID,
                    Object eventReference,
                    int triggerIndex,
                    Object context)
Cancels the event.  | 
 | 
static void | 
cancelImmediateEvent(long sourceID,
                     long eventID,
                     Object eventReference,
                     Object context)
Cancels any current immediate events.  | 
 | 
static void | 
deregisterConsequence(long consequenceID)
Removes the consequence from the list of known consequences.  | 
 | 
static void | 
deregisterNotificationsEngineListener(long sourceID,
                                      NotificationsEngineListener listener)
Removes the listener from the list of known listeneres.  | 
 | 
static void | 
deregisterSource(long sourceID)
Removes the application from the list of known event sources.  | 
 | 
static int | 
getDeferredEventCount(long sourceID)
Returns the count of all events matching the source currently in the queue.  | 
 | 
static long[] | 
getDeferredEventIds(long sourceID)
Returns the count of all events matching the source currently in the queue.  | 
 | 
static Object[] | 
getDeferredEvents(long sourceID)
Returns the count of all events matching the source currently in the queue.  | 
 | 
static long | 
getLastEventDate()
Method returns time stamp when the latest even either immediate or deferred happened  | 
 | 
static int | 
getMasterNotificationVolume()
Returns the master volume setting for notifications.  | 
 | 
static void | 
hideSource(long sourceID)
Hide the application from the list of known event sources.  | 
 | 
static boolean | 
isHidden(long sourceID)
Returns true if this source is marked as hidden.  | 
 | 
static boolean | 
isImmediateEventOccuring(long sourceIdLong)
Tests whether a particular event is playing or led blinking for an profile  | 
 | 
static boolean | 
isVibrateOnly()
Returns whether the device is in a Vibrate-Only mode.  | 
 | 
static void | 
moveSource(long srcSourceID,
           long destSourceID)
Changes the value of the source identifier specified by srcSourceID to destSourceID. | 
 | 
static void | 
negotiateDeferredEvent(long sourceID,
                       long eventID,
                       Object eventReference,
                       long eventDate,
                       int triggerIndex,
                       Object context)
Adds the specified event to the event queue.  | 
 | 
static void | 
registerConsequence(long consequenceID,
                    Consequence consequence)
Adds a new consequence to the list of known event consequences.  | 
 | 
static void | 
registerNotificationsEngineListener(long sourceID,
                                    NotificationsEngineListener listener)
Adds a listener to the list of known engine listeners.  | 
 | 
static void | 
registerSource(long sourceID,
               Object source,
               int level)
Adds the application to the list of known event sources.  | 
 | 
static void | 
registerSource(long sourceID,
               Object source,
               int level,
               long relatedSourceID)
Adds the application to the list of known event sources, inheriting defaults from another application.  | 
 | 
static void | 
setPhoneRingTone(String ringtone)
Sets the ringtone for all profiles.  | 
 | 
static void | 
triggerImmediateEvent(long sourceID,
                      long eventID,
                      Object eventReference,
                      Object context)
Triggers an immediate event.  | 
 | 
static void | 
triggerImmediateEvent(long sourceID,
                      long eventID,
                      Object eventReference,
                      Object context,
                      int notificationCategory)
Triggers an immediate event.  | 
 | 
static void | 
unHideSource(long sourceID)
Reveal a hidden the application from the list of known event sources.  | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static void triggerImmediateEvent(long sourceID,
                                         long eventID,
                                         Object eventReference,
                                         Object context)
sourceID - Identifier of the application triggering the event.eventID - Application-specific event identifier.eventReference - Application-specific event cookie.context - Optional context object.
public static void triggerImmediateEvent(long sourceID,
                                         long eventID,
                                         Object eventReference,
                                         Object context,
                                         int notificationCategory)
sourceID - Identifier of the application triggering the event.eventID - Application-specific event identifier.eventReference - Application-specific event cookie.context - Optional context object.notificationCategory - identifies a category of notifications
                           one of NotificationsConstants.CATEGORY_PHONE
                                  NotificationsConstants.CATEGORY_MESSAGES
                                  NotificationsConstants.CATEGORY_REMINDERS
public static void cancelImmediateEvent(long sourceID,
                                        long eventID,
                                        Object eventReference,
                                        Object context)
sourceID - Identifier of the application that triggered the event.eventID - Application-specific event identifier.eventReference - Application-specific event cookie.context - Optional context object.
public static void negotiateDeferredEvent(long sourceID,
                                          long eventID,
                                          Object eventReference,
                                          long eventDate,
                                          int triggerIndex,
                                          Object context)
Adds the specified event to the event queue. Exactly where in the queue the event is inserted is engine-specific, i.e., neither the event nor the application can decide it.
The triggerIndex parameter specifies further criteria for determining the event. Currently only two values are defined:
If the value MANUAL_TRIGGER is specified as the triggerIndex, the eventDate expiry parameter is ignored.
An event can be cancelled via the cancelDeferredEvent method. Furthermore, this call must be made to cancel an event that has no timeout.
sourceID - Identifier of the application that is queuing the event.eventID - Application-specific event identifier.eventReference - Application-specific event cookie.eventDate - Event expiry time in absolute time in ms. This parameter is currently ignored
 UNLESS the triggerIndex is NotificationsConstants.OUT_OF_HOLSTER_TRIGGERtriggerIndex - Identifier of the way in which the event will be triggered.context - Optional context object.
public static void cancelDeferredEvent(long sourceID,
                                       long eventID,
                                       Object eventReference,
                                       int triggerIndex,
                                       Object context)
sourceID - Identifier of the application that queued the event.eventID - Application-specific event identifier.eventReference - Application-specific event cookie.triggerIndex - Identifier of the way in which the event was to be triggered.context - Optional context object.
public static void cancelAllDeferredEvents(long sourceID,
                                           int triggerIndex,
                                           Object context)
sourceID - Identifier of the application that queued the events.triggerIndex - Identifier of the way in which the events were to be triggered.context - Optional context object.public static int getDeferredEventCount(long sourceID)
sourceID - GUID of the source object.public static Object[] getDeferredEvents(long sourceID)
sourceID - GUID of the source object.public static long[] getDeferredEventIds(long sourceID)
sourceID - GUID of the source object.
public static void registerSource(long sourceID,
                                  Object source,
                                  int level,
                                  long relatedSourceID)
sourceID - Identifier of the application to register.source - Source application object.level - Level at which the application is to be registered.relatedSourceID - Identifier of the application that this source will inherit from
NullPointerException - if source is null.
public static void moveSource(long srcSourceID,
                              long destSourceID)
srcSourceID to destSourceID.
 If destSourceID is already registered to another source, it will be overwritten by the
 source identifier srcSourceID and it will no longer be accessible.
srcSourceID - Old Identifier of the source.destSourceID - New Identifier of the source.
public static void registerSource(long sourceID,
                                  Object source,
                                  int level)
sourceID - Identifier of the application to register.source - Source application object.level - Level at which the application is to be registered.public static void deregisterSource(long sourceID)
sourceID - Identifier of the application to deregister.public static void hideSource(long sourceID)
sourceID - Identifier of the application to hide.public static void unHideSource(long sourceID)
sourceID - Identifier of the application to un hide.public static boolean isHidden(long sourceID)
public static void registerNotificationsEngineListener(long sourceID,
                                                       NotificationsEngineListener listener)
sourceID - GUID of the listener object to register.listener - Listener object.
public static void deregisterNotificationsEngineListener(long sourceID,
                                                         NotificationsEngineListener listener)
sourceID - GUID of the listener object to deregister.listener - Listener object.
public static void registerConsequence(long consequenceID,
                                       Consequence consequence)
consequenceID - GUID of the consequence object to register.consequence - Consequence object itself.public static void deregisterConsequence(long consequenceID)
consequenceID - GUID of the consequence object to deregister.public static long getLastEventDate()
public static boolean isImmediateEventOccuring(long sourceIdLong)
public static int getMasterNotificationVolume()
public static boolean isVibrateOnly()
true if the device is in a Vibrate-Only mode, false otherwise.public static void setPhoneRingTone(String ringtone)
ringtone - Filename of the ringtone to be set.
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited.  295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8.  All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal