[**react-native-notify-kit**](react-native/reference/index)

---

[react-native-notify-kit](react-native/reference/index) / NotificationAndroid

# Interface: NotificationAndroid

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:15](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L15)

The interface for Android specific options which are applied to a notification.

To learn more about Android notifications, view the [Android](/react-native/android/introduction)
documentation for full examples and usage.

## Platform

android

## Properties

### actions?

> `optional` **actions?**: [`AndroidAction`](react-native/reference/Interface.AndroidAction)\[]

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:24](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L24)

An array of [AndroidAction](/react-native/reference/androidaction) interfaces.

Adds quick actions to a notification. Quick Actions enable users to interact with your application
directly from the notification body, providing an overall greater user experience.

View the [Quick Actions](/react-native/android/interaction#quick-actions) documentation for more information.

---

### asForegroundService?

> `optional` **asForegroundService?**: `boolean`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:40](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L40)

When set to `true` this notification will be shown as a foreground service.

The application can only display one foreground service notification at once. If a
foreground service notification is already running and a new notification with this flag set to
`true` is provided, the service will stop the existing service and start a new one.

Ensure a foreground service runner function has been provided to `registerForegroundService`.
Without one, the notification will not be displayed.

View the [Foreground Service](/react-native/android/foreground-service) documentation for more information.

Defaults to `false`.

---

### autoCancel?

> `optional` **autoCancel?**: `boolean`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:62](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L62)

Setting this flag will make it so the notification is automatically canceled when the user
presses it in the panel.

By default when the user taps a notification it is automatically removed from the notification
panel. Setting this to `false` will keep the notification in the panel.

If `false`, the notification will persist in the notification panel after being pressed. It will
remain there until the user removes it (e.g. swipes away) or is cancelled via
[`cancelNotification`](/react-native/reference/cancelNotification).

Defaults to `true`.

---

### badgeCount?

> `optional` **badgeCount?**: `number`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:69](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L69)

Sets the number associated with this notification. Compatible Android launchers may use it for
the app icon badge, but numeric display is launcher-dependent and it is not equivalent to the
global iOS `notifee.setBadgeCount()` API.

---

### badgeIconType?

> `optional` **badgeIconType?**: [`AndroidBadgeIconType`](react-native/reference/Enumeration.AndroidBadgeIconType)

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:81](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L81)

Sets the type of badge used when the notification is being displayed in badge mode.

View the [Badges](/react-native/android/appearance#badges) documentation for more information
and usage examples.

Defaults to `AndroidBadgeIconType.LARGE`.

#### Platform

android API Level >= 26

---

### category?

> `optional` **category?**: [`AndroidCategory`](react-native/reference/Enumeration.AndroidCategory)

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:89](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L89)

Assigns the notification to a category. Use the one which best describes the notification.

The category may be used by the device for ranking and filtering. It has no visual or behavioural
impact.

---

### channelId?

> `optional` **channelId?**: `string`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:98](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L98)

Specifies the `AndroidChannel` which the notification will be delivered on.

On Android 8.0 (API 26) the channel ID is required. Providing a invalid channel ID will throw
an error. View the [Channels & Groups](/react-native/android/channels) documentation for
more information and usage examples.

---

### chronometerDirection?

> `optional` **chronometerDirection?**: `"up"` | `"down"`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:131](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L131)

If `showChronometer` is `true`, the direction of the chronometer can be changed to count down instead of up.

Has no effect if `showChronometer` is `false`.

Defaults to `up`.

---

### circularLargeIcon?

> `optional` **circularLargeIcon?**: `boolean`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:205](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L205)

Whether the large icon should be circular.

If `true`, the large icon will be rounded in the shape of a circle.

Defaults to `false`.

---

### color?

> `optional` **color?**: `string`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:108](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L108)

Set an custom accent color for the notification. If not provided, the default notification
system color will be used.

The color can be a predefined system `AndroidColor` or [hexadecimal](https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4).

View the [Color](/react-native/android/appearance#color) documentation for more information.

---

### colorized?

> `optional` **colorized?**: `boolean`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:122](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L122)

When `asForegroundService` is `true`, the notification will use the provided `color` property
to set a background color on the notification. This property has no effect when `asForegroundService`
is `false`.

This should only be used for high priority ongoing tasks like navigation, an ongoing call,
or other similarly high-priority events for the user.

View the [Foreground Service](/react-native/android/foreground-service) documentation for more information.

Defaults to `false`.

---

### defaults?

> `optional` **defaults?**: [`AndroidDefaults`](react-native/reference/Enumeration.AndroidDefaults)\[]

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:143](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L143)

For devices without notification channel support, this property sets the default behaviour
for a notification.

On API Level >= 26, this has no effect.

See [AndroidDefaults](/react-native/reference/androiddefaults) for more information.

#### Platform

android API Level < 26

---

### flags?

> `optional` **flags?**: [`AndroidFlags`](react-native/reference/Enumeration.AndroidFlags)\[]

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:251](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L251)

Set any additional flags

---

### foregroundServiceBehavior?

> `optional` **foregroundServiceBehavior?**: [`AndroidForegroundServiceBehavior`](react-native/reference/Enumeration.AndroidForegroundServiceBehavior)

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:312](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L312)

Controls the display behavior of the foreground service notification on Android 12+.

When `asForegroundService` is `true` and this property is not set, it defaults to
`AndroidForegroundServiceBehavior.IMMEDIATE`, which eliminates the up to 10-second
display delay that Android 12+ imposes on foreground service notifications.

Set to `AndroidForegroundServiceBehavior.DEFERRED` to restore the platform default
deferred behavior, or `AndroidForegroundServiceBehavior.DEFAULT` for the framework-neutral
default.

Ignored when `asForegroundService` is `false` or not set.

#### Platform

android API 31+

---

### foregroundServiceTypes?

> `optional` **foregroundServiceTypes?**: [`AndroidForegroundServiceType`](react-native/reference/Enumeration.AndroidForegroundServiceType)\[]

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:295](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L295)

Set the foreground service types identifying the work done by the service

View the [Foreground service types](https://developer.android.com/develop/background-work/services/fg-service-types) documentation to learn
more.

---

### fullScreenAction?

> `optional` **fullScreenAction?**: [`NotificationFullScreenAction`](react-native/reference/Interface.NotificationFullScreenAction)

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:287](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L287)

The `fullScreenAction` property requests Full-Screen Intent presentation from Android
when the notification is displayed.

Actual full-screen presentation depends on the app's Full-Screen Intent access and Android platform conditions.

View the [FullScreenAction](/react-native/android/behaviour#full-screen) documentation to learn
more.

---

### groupAlertBehavior?

> `optional` **groupAlertBehavior?**: [`AndroidGroupAlertBehavior`](react-native/reference/Enumeration.AndroidGroupAlertBehavior)

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:166](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L166)

Sets the group alert behavior for this notification. Use this method to mute this notification
if alerts for this notification's group should be handled by a different notification. This is
only applicable for notifications that belong to a `groupId`. This must be called on all notifications
you want to mute. For example, if you want only the summary of your group to make noise, all
children in the group should have the group alert behavior `AndroidGroupAlertBehavior.SUMMARY`.

View the [Android Grouping & Sorting guide](/react-native/android/grouping-and-sorting#group-behaviour)
documentation to learn more.

---

### groupId?

> `optional` **groupId?**: `string`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:154](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L154)

Set this notification to be part of a group of notifications sharing the same key. Grouped notifications may
display in a cluster or stack on devices which support such rendering.

On some devices, the system may automatically group notifications.

View the [Android Grouping & Sorting guide](/react-native/android/grouping-and-sorting) documentation to
learn more.

---

### groupSummary?

> `optional` **groupSummary?**: `boolean`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:176](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L176)

Whether this notification should be a group summary.

If `true`, Set this notification to be the group summary for a group of notifications. Grouped notifications may display in
a cluster or stack on devices which support such rendering. Requires a `groupId` key to be set.

Defaults to `false`.

---

### importance?

> `optional` **importance?**: [`AndroidImportance`](react-native/reference/Enumeration.AndroidImportance)

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:329](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L329)

Set a notification importance for devices without channel support.

Devices using Android API Level < 26 have no channel support, meaning incoming notifications
won't be assigned an importance level from the channel. If your application supports devices
without channel support, set this property to directly assign an importance level to the incoming
notification.

Defaults to `AndroidImportance.DEFAULT`.

View the [Appearance](/react-native/android/appearance#importance) documentation to learn
more.

#### Platform

android API Level < 26

---

### inputHistory?

> `optional` **inputHistory?**: `string`\[]

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:186](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L186)

The local user input history for this notification.

Input history is shown on supported devices below the main notification body. History of the
users input with the notification should be shown when receiving action input by updating
the existing notification. It is recommended to clear the history when it is no longer
relevant (e.g. someone has responded to the users input).

---

### largeIcon?

> `optional` **largeIcon?**: `string` | `number` | `object`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:196](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L196)

A local file path using the 'require()' method or a remote http to the picture to display.

Sets a large icon on the notification.

View the [Android Appearance](/react-native/android/appearance#large-icons) documentation to learn
more about this property.

---

### lights?

> `optional` **lights?**: \[`string`, `number`, `number`]

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:216](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L216)

Sets the color and frequency of the light pattern. This only has effect on supported devices.

The option takes an array containing a hexadecimal color value or predefined `AndroidColor`,
along with the number of milliseconds to show the light, and the number of milliseconds to
turn off the light. The light frequency pattern is repeated.

View the [Lights](/react-native/android/behaviour#lights) documentation for more information.

---

### lightUpScreen?

> `optional` **lightUpScreen?**: `boolean`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:47](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L47)

When set to `true` the screen will light up when the notification is displayed.

Defaults to `false`.

---

### localOnly?

> `optional` **localOnly?**: `boolean`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:227](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L227)

Sets whether the notification will only appear on the local device.

Users who have connected devices which support notifications (such as a smart watch) will
receive an alert for the notification on that device. If set to `true`, the notification will
only alert on the main device.

Defaults to `false`.

---

### loopSound?

> `optional` **loopSound?**: `boolean`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:246](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L246)

Set whether the sound should loop, by default, the sound will only play once.

This property is useful if you have an ongoing notification.

---

### ongoing?

> `optional` **ongoing?**: `boolean`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:239](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L239)

Set whether this is an on-going notification.

Setting this value to `true` changes the default behaviour of a notification:

- Ongoing notifications are sorted above the regular notifications in the notification panel.
- Ongoing notifications do not have an 'X' close button, and are not affected by the "Clear all" button.

View the [Ongoing](/react-native/android/behaviour#ongoing) documentation for more information.

---

### onlyAlertOnce?

> `optional` **onlyAlertOnce?**: `boolean`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:262](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L262)

Notifications with the same `id` will only show a single instance at any one time on your device,
however will still alert the user (for example, by making a sound).

If this flag is set to `true`, notifications with the same `id` will only alert the user once whilst
the notification is visible.

This property is commonly used when frequently updating a notification (such as updating the progress bar).

---

### pressAction?

> `optional` **pressAction?**: [`NotificationPressAction`](react-native/reference/Interface.NotificationPressAction) | `null`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:276](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L276)

Controls what happens when a user presses the notification.

Defaults to `{ id: 'default', launchActivity: 'default' }` when omitted,
which opens the app's main activity on tap.

Pass `null` explicitly to create a non-tappable notification (the notification
will display but tapping it will do nothing).

View the [Interaction](/react-native/android/interaction) documentation to learn
more.

---

### progress?

> `optional` **progress?**: [`AndroidProgress`](react-native/reference/Interface.AndroidProgress)

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:338](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L338)

A notification can show current progress of a task. The progress state can either be fixed or
indeterminate (unknown).

View the [Progress Indicators](/react-native/android/progress-indicators) documentation
to learn more.

---

### showChronometer?

> `optional` **showChronometer?**: `boolean`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:413](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L413)

Shows a counting timer on the notification, useful for on-going notifications such as a phone call.

If no `timestamp` is provided, a counter will display on the notification starting from 00:00. If a `timestamp` is
provided, the number of hours/minutes/seconds since that have elapsed since that value will be shown instead.

Defaults to `false`.

View the [Timers](/react-native/android/timers#timers) documentation to learn more.

---

### showTimestamp?

> `optional` **showTimestamp?**: `boolean`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:350](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L350)

Sets whether the `timestamp` provided is shown in the notification.

Setting this field is useful for notifications which are more informative with a timestamp,
such as an E-Mail.

If no `timestamp` is set, this field has no effect.

View the [Timestamps](/react-native/android/timers#timestamps) documentation to learn more.

---

### smallIcon?

> `optional` **smallIcon?**: `string`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:358](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L358)

The small icon to show in the heads-up notification.

View the [Icons](/react-native/android/appearance#small-icons) documentation to learn
more.

---

### smallIconLevel?

> `optional` **smallIconLevel?**: `number`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:363](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L363)

An additional level parameter for when the icon is an instance of a Android `LevelListDrawable`.

---

### sortKey?

> `optional` **sortKey?**: `string`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:376](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L376)

Set a sort key that orders this notification among other notifications from the same package.
This can be useful if an external sort was already applied and an app would like to preserve
this. Notifications will be sorted lexicographically using this value, although providing
different priorities in addition to providing sort key may cause this value to be ignored.

If a `groupId` has been set, the sort key can also be used to order members of a notification group.

View the [Android Grouping & Sorting](/react-native/android/grouping-and-sorting#sorting)
documentation to learn more.

---

### sound?

> `optional` **sound?**: `string`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:465](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L465)

Overrides the sound the notification is displayed with.

The default value is to play no sound. To play the default system sound use 'default'.

This setting has no behaviour on Android after API level version 26, instead you can set the
sound on the notification channels.

View the [Sound](/react-native/android/behaviour#sound) documentation for more information.

#### Platform

android API Level < 26

---

### style?

> `optional` **style?**: [`AndroidBigPictureStyle`](react-native/reference/Interface.AndroidBigPictureStyle) | [`AndroidBigTextStyle`](react-native/reference/Interface.AndroidBigTextStyle) | [`AndroidInboxStyle`](react-native/reference/Interface.AndroidInboxStyle) | [`AndroidMessagingStyle`](react-native/reference/Interface.AndroidMessagingStyle)

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:386](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L386)

Styled notifications provide users with more informative content and additional functionality.

Android supports different styles, however only one can be used with a notification.

View the [Styles](/react-native/android/styles) documentation to learn more
view usage examples.

---

### tag?

> `optional` **tag?**: `string`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:439](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L439)

Sets a tag on the notification.

Tags can be used to query groups notifications by the tag value. Setting a tag has no
impact on the notification itself.

---

### ticker?

> `optional` **ticker?**: `string`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:395](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L395)

Text that summarizes this notification for accessibility services. As of the Android L release, this
text is no longer shown on screen, but it is still useful to accessibility services
(where it serves as an audible announcement of the notification's appearance).

Ticker text does not show in the notification.

---

### timeoutAfter?

> `optional` **timeoutAfter?**: `number`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:401](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L401)

Sets the time in milliseconds at which the notification should be
automatically cancelled once displayed, if it is not already cancelled.

---

### timestamp?

> `optional` **timestamp?**: `number`

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:451](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L451)

The timestamp in milliseconds for this notification. Notifications in the panel are sorted by this time.

The timestamp can be used with other properties to change the behaviour of a notification:

- Use with `showTimestamp` to show the timestamp to the users.
- Use with `showChronometer` to create a on-going timer.

View the [Timers](/react-native/android/timers) documentation to learn more.

---

### vibrationPattern?

> `optional` **vibrationPattern?**: `number`\[]

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:420](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L420)

Sets the vibration pattern the notification uses when displayed. Must be an even amount of numbers.

View the [Vibration](/react-native/android/behaviour#vibration) documentation to learn more.

---

### visibility?

> `optional` **visibility?**: [`AndroidVisibility`](react-native/reference/Enumeration.AndroidVisibility)

Defined in: [packages/react-native/src/types/NotificationAndroid.ts:431](https://github.com/marcocrupi/react-native-notify-kit/blob/main/packages/react-native/src/types/NotificationAndroid.ts#L431)

Sets the visibility for this notification. This may be used for apps which show user
sensitive information (e.g. a banking app).

Defaults to `AndroidVisibility.PRIVATE`.

View the [Visibility](/react-native/android/appearance#visibility) documentation to learn
more.
