MIDP3.0

javax.microedition.lcdui
Interface NotificationListener


public interface NotificationListener

This interface is used by applications that need to receive events indicating changes in the state of a Notification. An application may provide one or more implementations of NotificationListener (typically by using a nested class or an inner class). Different parts of the application typically have their own NotificationListener to handle their own Notification callbacks.

Before notificationSelected, notificationTimeout or notificationDismissed are called, the Notification MUST be removed by the implementation.

The specification does not require the implementation to create several threads for Notification delivery. Thus, if a NotificationListener method does not return or the return is delayed, the system may be blocked. So, there is the following note to application developers :

Since:
MIDP 3.0

Method Summary
 void notificationDismissed(Notification notification)
          Called when a Notification has been dismissed by the user.
 void notificationSelected(Notification notification)
          Called when a Notification has been selected by the user.
 void notificationTimeout(Notification notification)
          Called when a Notification has been removed by the system.
 

Method Detail

notificationDismissed

void notificationDismissed(Notification notification)
Called when a Notification has been dismissed by the user. After this method has been called, the Notification will no longer be active in the implementation.

Parameters:
notification - the Notification being dismissed by the user. The MIDlet must implement the functionality to be performed when the Notification is dismissed.

notificationSelected

void notificationSelected(Notification notification)
Called when a Notification has been selected by the user. After this method has been called, the Notification will no longer be active in the implementation.

Parameters:
notification - the Notification being responded to by the user. The MIDlet must implement the functionality to be performed when the Notification is selected.
See Also:
Notification.post(boolean), Notification.post(boolean, int)

notificationTimeout

void notificationTimeout(Notification notification)
Called when a Notification has been removed by the system. After this method has been called, the Notification will no longer be active in the system. This method is called after the Notification has been removed (due to displayTime being exceeded).

Parameters:
notification - the Notification being removed by the device. The MIDlet must implement the functionality to be performed when the Notification is removed.
See Also:
Notification.post(boolean, int)

MIDP3.0

Send a comment or suggestionVersion 3.0 of Mobile Information Device Profile Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-2009 Motorola Inc. Portions copyright 1993-2002 Sun Microsystems, Inc. and Motorola, Inc. All Rights Reserved.