You are reading 13.1.0. See this page in 13.4.1.
Titanium.Android.NotificationManager
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
Inherited from Titanium.Proxy
The name of the API that this proxy corresponds to.
Inherited from Titanium.Proxy
Indicates if the proxy will bubble an event to its parent.
Default: true
Use Titanium.Android.DEFAULT_ALL instead.
Use Titanium.Android.DEFAULT_LIGHTS instead.
Use Titanium.Android.DEFAULT_SOUND instead.
Use Titanium.Android.DEFAULT_VIBRATE instead.
Use Titanium.Android.FLAG_AUTO_CANCEL instead.
Use Titanium.Android.FLAG_INSISTENT instead.
Use Titanium.Android.FLAG_NO_CLEAR instead.
Use Titanium.Android.FLAG_ONGOING_EVENT instead.
Use Titanium.Android.FLAG_ONLY_ALERT_ONCE instead.
Use Titanium.Android.FLAG_SHOW_LIGHTS instead.
Inherited from Titanium.Proxy
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
Returns an object with the ID and name of the notification channels
Use Titanium.Android.STREAM_DEFAULT instead.
Methods 10
Inherited from Titanium.Proxy
Adds the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to invoke when the event is fired. 4 fields
|
applyProperties
since 3.0.0Inherited from Titanium.Proxy
Applies the properties to the proxy.
| Parameters | Type | Description |
|---|---|---|
| props | Dictionary | A dictionary of properties to apply. |
areNotificationsEnabled
since 7.1.0Returns whether showing notifications is enabled for the application.
Cancels a previously displayed notification.
| Parameters | Type | Description |
|---|---|---|
| id | Number | The ID passed to notify. |
Cancels all previously displayed notifications.
createNotificationChannel
Android 8.0+Create a notification channel.
This will return null when used on Android versions lower than 8.0.
| Parameters | Type | Description |
|---|---|---|
| parameters | Dictionary<Titanium.Android.NotificationChannel> | Properties to set on a new object, including any defined by Titanium.Android.NotificationChannel except those marked not-creation or read-only. |
Deletes a notification channel.
| Parameters | Type | Description |
|---|---|---|
| id | String | The id of the channel |
Inherited from Titanium.Proxy
Fires a synthesized event to any registered listeners.
| Parameters | Type | Description |
|---|---|---|
| name | String | 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 | Type | Description |
|---|---|---|
| id | Number | An ID that may be used to cancel a shown notification. |
| notification | Titanium.Android.Notification | Notification to display. |
Inherited from Titanium.Proxy
Removes the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to remove. Must be the same function passed to 4 fields
|