mirror of
https://github.com/zhigang1992/react-native-notifications.git
synced 2026-06-11 00:08:50 +08:00
911 B
Executable File
911 B
Executable File
id, title, sidebar_label
| id | title | sidebar_label |
|---|---|---|
| notification-object | Notification object | Notification |
Contains the payload data.
title- returns the notification's title string.subtitle- returns the notification's title string. (iOS only)body- returns the notification's main message string.sound- returns the sound string from theapsobject.badge- returns the badge count number from theapsobject.category- returns the category from theapsobject (related to interactive notifications).payload- returns the full payload sent from server.
Example:
Notifications.events().registerNotificationReceived((notification: Notification, completion: (response: NotificationCompletion) => void) => {
// Prints the notification payload
console.log(JSON.stringify(notification.payload));
completion({alert: false, sound: false, badge: false});
});