# Titanium.Android.NotificationManager

> Module for managing notifications.

- Source: https://titaniumsdk.com/docs/sdk/12.6.4/Titanium.Android.NotificationManager
- Titanium SDK version: 12.6.4
- Kind: module
- Platforms: Android
- Since: Titanium SDK 1.5
- Extends: Titanium.Module
- Inheritance: Titanium.Module > Titanium.Proxy

This module provides methods for sending and canceling notifications,
which are represented by the [Titanium.Android.Notification](https://titaniumsdk.com/docs/sdk/Titanium.Android.Notification.md) object.

Further Reading:

  * [Android Notifications guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Notification_Services/Android_Notifications.html)
  * [Android Developer: Notifications](https://developer.android.com/guide/topics/ui/notifiers/notifications.html)

## Properties

### DEFAULT_ALL

- Type: Number
- Platforms: Android
- Permission: read-only

Use [Titanium.Android.DEFAULT_ALL](https://titaniumsdk.com/docs/sdk/Titanium.Android.md#DEFAULT_ALL) instead.

### DEFAULT_LIGHTS

- Type: Number
- Platforms: Android
- Permission: read-only

Use [Titanium.Android.DEFAULT_LIGHTS](https://titaniumsdk.com/docs/sdk/Titanium.Android.md#DEFAULT_LIGHTS) instead.

### DEFAULT_SOUND

- Type: Number
- Platforms: Android
- Permission: read-only

Use [Titanium.Android.DEFAULT_SOUND](https://titaniumsdk.com/docs/sdk/Titanium.Android.md#DEFAULT_SOUND) instead.

### DEFAULT_VIBRATE

- Type: Number
- Platforms: Android
- Permission: read-only

Use [Titanium.Android.DEFAULT_VIBRATE](https://titaniumsdk.com/docs/sdk/Titanium.Android.md#DEFAULT_VIBRATE) instead.

### FLAG_AUTO_CANCEL

- Type: Number
- Platforms: Android
- Permission: read-only

Use [Titanium.Android.FLAG_AUTO_CANCEL](https://titaniumsdk.com/docs/sdk/Titanium.Android.md#FLAG_AUTO_CANCEL) instead.

### FLAG_INSISTENT

- Type: Number
- Platforms: Android
- Permission: read-only

Use [Titanium.Android.FLAG_INSISTENT](https://titaniumsdk.com/docs/sdk/Titanium.Android.md#FLAG_INSISTENT) instead.

### FLAG_NO_CLEAR

- Type: Number
- Platforms: Android
- Permission: read-only

Use [Titanium.Android.FLAG_NO_CLEAR](https://titaniumsdk.com/docs/sdk/Titanium.Android.md#FLAG_NO_CLEAR) instead.

### FLAG_ONGOING_EVENT

- Type: Number
- Platforms: Android
- Permission: read-only

Use [Titanium.Android.FLAG_ONGOING_EVENT](https://titaniumsdk.com/docs/sdk/Titanium.Android.md#FLAG_ONGOING_EVENT) instead.

### FLAG_ONLY_ALERT_ONCE

- Type: Number
- Platforms: Android
- Permission: read-only

Use [Titanium.Android.FLAG_ONLY_ALERT_ONCE](https://titaniumsdk.com/docs/sdk/Titanium.Android.md#FLAG_ONLY_ALERT_ONCE) instead.

### FLAG_SHOW_LIGHTS

- Type: Number
- Platforms: Android
- Permission: read-only

Use [Titanium.Android.FLAG_SHOW_LIGHTS](https://titaniumsdk.com/docs/sdk/Titanium.Android.md#FLAG_SHOW_LIGHTS) instead.

### notificationChannels

- Type: Dictionary<NotificationChannels>
- Platforms: Android
- Since: Titanium SDK 12.1.0

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

### STREAM_DEFAULT

- Type: Number
- Platforms: Android
- Permission: read-only

Use [Titanium.Android.STREAM_DEFAULT](https://titaniumsdk.com/docs/sdk/Titanium.Android.md#STREAM_DEFAULT) instead.

## Methods

### areNotificationsEnabled

- Platforms: Android
- Since: Titanium SDK 7.1.0

Returns whether showing notifications is enabled for the application.

Returns: Boolean

### cancel

- Platforms: Android

Cancels a previously displayed notification.

Parameters:

- `id` (Number): The ID passed to [notify](https://titaniumsdk.com/docs/sdk/Titanium.Android.NotificationManager.md#notify).

### cancelAll

- Platforms: Android

Cancels all previously displayed notifications.

### createNotificationChannel

- Platforms: Android
- Requires: Android 8.0+

Create a notification channel.

This will return `null` when used on Android versions lower than 8.0.

Parameters:

- `parameters` (Dictionary<Titanium.Android.NotificationChannel>): Properties to set on a new object, including any defined by [Titanium.Android.NotificationChannel](https://titaniumsdk.com/docs/sdk/Titanium.Android.NotificationChannel.md) except those marked not-creation or read-only.

Returns: Titanium.Android.NotificationChannel

### deleteNotificationChannel

- Platforms: Android
- Since: Titanium SDK 12.0.0
- Requires: Android 8.0+

Deletes a notification channel.

Parameters:

- `id` (String): The id of the channel

### notify

- Platforms: Android

Adds a persistent notification to the status bar.

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

Parameters:

- `id` (Number): An ID that may be used to cancel a shown notification.
- `notification` (Titanium.Android.Notification): Notification to display.

## Inherited members

7 members are inherited. Each is documented on the type that declares it.

- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/12.6.4/Titanium.Proxy.md): `addEventListener`, `apiName`, `applyProperties`, `bubbleParent`, `fireEvent`, `lifecycleContainer`, `removeEventListener`

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

