|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The NotificationsEngineListener interface provides the API used to negotiate
the pushing and popping of user interfaces from simple dialogs to complex
screens in response to notification events. Only applications
wishing to trigger such events need to implement this API. If the application simply
wants to do something without requiring user input, such as playing a tune, it can simply use the appropriate
NotificationEngine calls.
| 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 | ||
|
void |
deferredEventWasSuperseded(long sourceID,
long eventID,
Object eventReference,
Object context)
Signals that the event was superseded by a more recent one at the same or at greater level. |
|
void |
notificationsEngineStateChanged(int stateInt,
long sourceID,
long eventID,
Object eventReference,
Object context)
Signals that the state of the notifications engine has changed. |
|
void |
proceedWithDeferredEvent(long sourceID,
long eventID,
Object eventReference,
Object context)
Signals that the listener is free to proceed with the event. |
| Method Detail |
public void deferredEventWasSuperseded(long sourceID,
long eventID,
Object eventReference,
Object context)
Note that only one of the eventID and eventReference should be used. The eventReference is used if it's not null; otherwise, the eventID is used.
sourceID - Identifier of the application which triggered the notification.eventID - Application-specific event identifier.eventReference - Application-specific event reference.context - Optional context for the operation.
public void notificationsEngineStateChanged(int stateInt,
long sourceID,
long eventID,
Object eventReference,
Object context)
state - Engine-specific state value.sourceID - Identifier of the application which triggered the notification.eventID - Application-specific event identifier of the active event.eventReference - Application-specific event reference of the active event.context - Optional context for the operation.
public void proceedWithDeferredEvent(long sourceID,
long eventID,
Object eventReference,
Object context)
Signals that the listener is free to proceed with the event. This usually means putting some kind of user interface up. The event remains active until one of the following happens:
The UI displayed must be invoked on a separate UiApplication instance, that is, rendering the UI on the calling thread MUST not occur. An example:
public void proceedWithDeferredEvent(long sourceID, long eventID, Object eventReference, Object context)
{
app.invokeLater(new Runnable() { //where app is the UiApplication instance
public void run() {
//do work here to render the gui
}
});
}
a) Listener calls NotificationsManager.cancelDeferredEvent with the active event id.
b) The listener's deferredEventWasSuperseded is called with the active event id.
Note that only one of the eventID and eventReference should be used. The eventReference is used if it's not null; otherwise, the eventID is used.
sourceID - Identifier of the application which triggered the notification.eventID - Application-specific event identifier.eventReference - Application-specific event reference.context - Optional context for the operation.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2007 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.