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

Android Only

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

android?: NotificationAndroid;

body

The main body content of a notification.

body?: string | undefined;

data

Additional data to store on the notification. Only string values can be stored.

data?: undefined | { [key: string]: string };

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).

id

A unique identifier for your notification.

id?: undefined | string;

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

iOS Only

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

ios?: NotificationIOS;

remote

iOS Only

Will be populated if it's a remote notification

remote?: undefined | false | true;

subtitle

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

subtitle?: string | undefined;

title

The notification title which appears above the body text.

title?: string | undefined;

Copyright 2020 - 2021 © Invertase Limited

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License and code samples are licensed under the Apache 2.0 License.

All product names, logos, and brands are property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.