public class NotificationsManagerImpl extends Observable implements NotificationsManager, ApplicationLifecycleListener
NotificationsManager
implementation.Constructor and Description |
---|
NotificationsManagerImpl()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel(String tag)
Cancels a notification.
|
void |
cancelAll()
Cancels all notifications.
|
Notification[] |
getNotifications()
Gets all active notifications.
|
void |
notify(Notification notification)
Posts a notification.
|
void |
stateChanged(Application application)
Called whenever an application has changed in the observed applications manager.
|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, getObservers, hasChanged, notifyObservers, setChanged
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addObserver, deleteObserver
public void cancel(String tag)
NotificationsManager
The observers will be notified with the tag as argument.
cancel
in interface NotificationsManager
tag
- the tag to cancel.public void cancelAll()
NotificationsManager
The observers will be notified with a null
argument.
cancelAll
in interface NotificationsManager
public Notification[] getNotifications()
NotificationsManager
getNotifications
in interface NotificationsManager
public void notify(Notification notification)
NotificationsManager
The observers will be notified with the notification tag as argument.
notify
in interface NotificationsManager
notification
- the notification to be posted.public void stateChanged(Application application)
ApplicationLifecycleListener
stateChanged
in interface ApplicationLifecycleListener
application
- the application that has changed.