danger.ui
Class NotificationManager

java.lang.Object
  |
  +--danger.app.Listener
        |
        +--danger.ui.NotificationManager

public class NotificationManager
extends Listener


Field Summary
static int kFlag_PendingMessage
           
static int kFlag_PendingMissedCallAlert
           
static int kFlag_PendingSystemAlert
           
 
Constructor Summary
NotificationManager()
           
 
Method Summary
static TitleBarNotifier getActiveNotifier()
           
static int getPendingIconCycleIndex()
           
static java.lang.String getPhoneCallDuration()
           
static Bitmap[] getVisiblePendingIcons(boolean inChooser)
           
static void incomingPhoneCallNotify(DialogWindow alert)
           
static void initialize()
           
static boolean isMarqueeAlertDisplaying()
           
static void marqueeAlertNotify(MarqueeAlert alert)
          MarqueeAlertNotify
static void marqueeAlertRemove(MarqueeAlert alert)
           
static void missedPhoneCallNotify(DialogWindow alert)
           
static void notify(int resourceID)
           
static void notify(int resourceID, int volume)
           
static void notify(int resourceID, int filter, boolean loop)
           
static void notify(RingToneObject ringTone)
           
static void notify(RingToneObject ringTone, boolean loop)
           
static void phoneCallDurationChanged(java.lang.String duration)
           
static void playErrorSound()
           
static void playNotifySound()
           
 boolean receiveEvent(Event event)
          Entry point for event processing.
static void registerPendingIcon(java.lang.String key, Bitmap icon, Bitmap iconInChooser)
           
static void registerPendingIconListener(Listener listener)
           
static void removeSystemAlert(DialogWindow alert)
          Remove a system alert, phone call, missed phone call, or alarm Safe to call redundently
static void restoreDefaultNotifier()
           
protected static void run()
          Here are the different types of system alerts - incoming phone call alert, - missed phone call alert, - system alert, - time based alert(such as Calendar alerts).
static void setActiveNotifier(TitleBarNotifier notifier)
           
static void setPendingIconVisible(java.lang.String key, boolean visible)
           
static void stopNotify(int resourceID)
           
static void stopNotify(RingToneObject ringTone)
           
static void systemAlarmNotify(DialogWindow alert)
           
static void systemAlertNotify(DialogWindow alert)
          SystemAlertNotify
static void updateSleepModeInfo(DialogWindow alert)
          If a dialog changes its sleep-mode info (eg, icon, title, or message) then it needs to call this method to make sure the sleep mode dialog gets updated.
 
Methods inherited from class danger.app.Listener
cancelEvents, receiveEventInternal, sendEvent, sendEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kFlag_PendingMessage

public static final int kFlag_PendingMessage

kFlag_PendingMissedCallAlert

public static final int kFlag_PendingMissedCallAlert

kFlag_PendingSystemAlert

public static final int kFlag_PendingSystemAlert
Constructor Detail

NotificationManager

public NotificationManager()
Method Detail

initialize

public static void initialize()

receiveEvent

public boolean receiveEvent(Event event)
Description copied from class: Listener
Entry point for event processing. Default behaviour is to do nothing and return false. Normally this method is called from a Dispatcher when it discovers an Event in its queue that is targetted at this Listener.
Overrides:
receiveEvent in class Listener

notify

public static void notify(RingToneObject ringTone)

notify

public static void notify(RingToneObject ringTone,
                          boolean loop)

notify

public static void notify(int resourceID)

notify

public static void notify(int resourceID,
                          int volume)

notify

public static void notify(int resourceID,
                          int filter,
                          boolean loop)

stopNotify

public static void stopNotify(RingToneObject ringTone)

stopNotify

public static void stopNotify(int resourceID)

playNotifySound

public static void playNotifySound()

playErrorSound

public static void playErrorSound()

marqueeAlertNotify

public static void marqueeAlertNotify(MarqueeAlert alert)
MarqueeAlertNotify

marqueeAlertRemove

public static void marqueeAlertRemove(MarqueeAlert alert)

systemAlertNotify

public static void systemAlertNotify(DialogWindow alert)
SystemAlertNotify

incomingPhoneCallNotify

public static void incomingPhoneCallNotify(DialogWindow alert)

missedPhoneCallNotify

public static void missedPhoneCallNotify(DialogWindow alert)

systemAlarmNotify

public static void systemAlarmNotify(DialogWindow alert)

removeSystemAlert

public static void removeSystemAlert(DialogWindow alert)
Remove a system alert, phone call, missed phone call, or alarm Safe to call redundently

updateSleepModeInfo

public static void updateSleepModeInfo(DialogWindow alert)
If a dialog changes its sleep-mode info (eg, icon, title, or message) then it needs to call this method to make sure the sleep mode dialog gets updated. We "push" instead of "pull" so we don't make method calls to the dialog from other threads

run

protected static void run()
Here are the different types of system alerts - incoming phone call alert, - missed phone call alert, - system alert, - time based alert(such as Calendar alerts). each have different priorities: - incoming phone call alert has the highest priority, and should always show above other alerts. - time based alert, when triggered initially(accompanied by some ring tone notification), will stay in 2nd highest priority for some short time(while ringing); but will lower its priority after the ringing expires, and will get appended to a digest queue. The latest alert wins here, and will push the older ringing alert down to the digest queue. - system alerts(alert triggered by system errors, etc), will be the next in line in priority ordering. system alerts will stack on top of themselves. - missed phone call alert, will have the 4th highest priority, and will show before the alerts in the digest queue. - the time based alerts that got pushed to the digest queue will be the lowest priority. They won't disappear until the user respond to them.

isMarqueeAlertDisplaying

public static boolean isMarqueeAlertDisplaying()

getActiveNotifier

public static TitleBarNotifier getActiveNotifier()

setActiveNotifier

public static void setActiveNotifier(TitleBarNotifier notifier)

restoreDefaultNotifier

public static void restoreDefaultNotifier()

registerPendingIconListener

public static void registerPendingIconListener(Listener listener)

registerPendingIcon

public static void registerPendingIcon(java.lang.String key,
                                       Bitmap icon,
                                       Bitmap iconInChooser)

setPendingIconVisible

public static void setPendingIconVisible(java.lang.String key,
                                         boolean visible)

getVisiblePendingIcons

public static Bitmap[] getVisiblePendingIcons(boolean inChooser)

getPendingIconCycleIndex

public static int getPendingIconCycleIndex()

phoneCallDurationChanged

public static void phoneCallDurationChanged(java.lang.String duration)

getPhoneCallDuration

public static java.lang.String getPhoneCallDuration()


Danger Confidential. Copyright © 2000-2003, Danger Inc.