Skip to content
Titanium SDK
Version13.1.0

You are reading 13.1.0. See this page in 13.4.1.

Titanium.Android.NotificationManager

moduleAndroidsince 1.5

Extends Titanium.ModuleTitanium.Proxy

Module for managing notifications.

This module provides methods for sending and canceling notifications, which are represented by the Titanium.Android.Notification object.

Further Reading:

Properties 15

apiName

Stringsince Android 3.2.0, iPhone 3.2.0, iPad 3.2.0, macOS 9.2.0read-only

Inherited from Titanium.Proxy

The name of the API that this proxy corresponds to.

bubbleParent

Booleansince Android 3.0.0, iPhone 3.0.0, iPad 3.0.0, macOS 9.2.0

Inherited from Titanium.Proxy

Indicates if the proxy will bubble an event to its parent.

Default: true

notificationChannels

Dictionary<NotificationChannels>since 12.1.0

Returns an object with the ID and name of the notification channels

Methods 10

Inherited from Titanium.Proxy

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

Parameters
ParametersTypeDescription
nameString

Name of the event.

callbackCallback<Titanium.Event>

Callback function to invoke when the event is fired.

4 fields
bubbles Boolean

True if the event will try to bubble up if possible.

cancelBubble Boolean

Set to true to stop the event from bubbling.

source Object

Source object that fired the event.

type String

Name of the event fired.

Returns whether showing notifications is enabled for the application.

Returns Boolean

Cancels a previously displayed notification.

Parameters
ParametersTypeDescription
idNumber

The ID passed to notify.

Cancels all previously displayed notifications.

deleteNotificationChannel

since 12.0.0Android 8.0+

Deletes a notification channel.

Parameters
ParametersTypeDescription
idString

The id of the channel

Inherited from Titanium.Proxy

Fires a synthesized event to any registered listeners.

Parameters
ParametersTypeDescription
nameString

Name of the event.

event?Dictionary

A dictionary of keys and values to add to the Titanium.Event object sent to the listeners.

Adds a persistent notification to the status bar.

The new notification replaces any previous notification with the same id.

Parameters
ParametersTypeDescription
idNumber

An ID that may be used to cancel a shown notification.

notificationTitanium.Android.Notification

Notification to display.

Inherited from Titanium.Proxy

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

Parameters
ParametersTypeDescription
nameString

Name of the event.

callbackCallback<Titanium.Event>

Callback function to remove. Must be the same function passed to addEventListener.

4 fields
bubbles Boolean

True if the event will try to bubble up if possible.

cancelBubble Boolean

Set to true to stop the event from bubbling.

source Object

Source object that fired the event.

type String

Name of the event fired.

Compiled from Titanium/Android/NotificationManager/NotificationManager.ymlEdit on GitHub