Titanium.Android.NotificationManager

Submodule of Titanium.Android.
Platform Since
Android 1.5

Summary

Module to notify users of events that happen.

Description

The NotificationManager module is a thin wrapper on the Android NotificationManager class.

The constants in this module are derived from the Android Notification class.

Methods

Name Summary
addEventListener

Adds the specified callback as an event listener for the named event.

cancel

Cancel a previously shown notification.

cancelAll

Cancel all previously shown notifications.

fireEvent

Fires a synthesized event to any registered listeners.

notify

Add a persistent notification to the status bar.

removeEventListener

Removes the specified callback as an event listener for the named event.

Properties

Name Type Summary
DEFAULT_ALL Number

Use all default values (where applicable). read-only

DEFAULT_LIGHTS Number

Use the default notification lights. read-only

DEFAULT_SOUND Number

Use the default notification sound. read-only

DEFAULT_VIBRATE Number

Use the default notification vibrate. read-only

FLAG_AUTO_CANCEL Number

Bit to be bitwise-ored into the flags field that should be set if the notification should be canceled when it is clicked by the user. read-only

FLAG_INSISTENT Number

Bit to be bitwise-ored into the flags field that if set, the audio will be repeated until the notification is cancelled or the notification window is opened. read-only

FLAG_NO_CLEAR Number

Bit to be bitwise-ored into the flags field that should be set if the notification should not be canceled when the user clicks the Clear all button. read-only

FLAG_ONGOING_EVENT Number

Bit to be bitwise-ored into the flags field that should be set if this notification is in reference to something that is ongoing, like a phone call. read-only

FLAG_ONLY_ALERT_ONCE Number

Bit to be bitwise-ored into the flags field that should be set if you want the sound and/or vibration play each time the notification is sent, even if it has not been canceled before that. read-only

FLAG_SHOW_LIGHTS Number

Bit to be bitwise-ored into the flags field that should be set if you want the LED on for this notification. read-only

STREAM_DEFAULT Number

Use this constant as the value for audioStreamType to request that the default stream type for notifications be used. read-only

Events

This type has no events.