Interface: Notification

Interface for building a local notification for both Android & iOS devices.

To learn more about displaying a notification, view the Displaying a Notification documentation.

Properties

android?

optional android: NotificationAndroid

Android specific notification options. See the NotificationAndroid interface for more information and default options which are applied to a notification.

Platform

android

body?

optional body: string

The main body content of a notification.

data?

optional data: object

Additional data to store on the notification.

Data can be used to provide additional context to your notification which can be retrieved at a later point in time (e.g. via an event).

Index Signature

[key: string]: string | number | object

id?

optional id: string

A unique identifier for your notification.

Notifications with the same ID will be created as the same instance, allowing you to update a notification which already exists on the device.

Defaults to a random string if not provided.

ios?

optional ios: NotificationIOS

iOS specific notification options. See the NotificationIOS interface for more information and default options which are applied to a notification.

Platform

ios

remote?

readonly optional remote: object

Will be populated if it's a remote notification

contentAvailable?

optional contentAvailable: number

messageId

messageId: string

mutableContent?

optional mutableContent: number

senderId

senderId: string

Platform

ios

subtitle?

optional subtitle: string

The notification subtitle, which appears on a new line below/next the title.

title?

optional title: string

The notification title which appears above the body text.