mirror of
https://github.com/zhigang1992/react-native-notifications.git
synced 2026-06-13 17:45:45 +08:00
1.1 KiB
Executable File
1.1 KiB
Executable File
id, title, sidebar_label
| id | title | sidebar_label |
|---|---|---|
| general-events | General | General |
registerRemoteNotificationsRegistered
registerRemoteNotificationsRegistered
Notifications.events().registerRemoteNotificationsRegistered((event: Registered) => {
console.log(event.deviceToken);
});
registerNotificationReceived
registerNotificationReceived
Notifications.events().registerNotificationReceived((notification: Notification, completion: (response: NotificationCompletion) => void) => {
console.log(JSON.stringify(notification.data));
// Calling completion on iOS with `alert: true` will present the native iOS inApp notification.
completion({alert: true, sound: true, badge: false});
});
registerRemoteNotificationOpened
registerRemoteNotificationOpened
Notifications.events().registerRemoteNotificationOpened((notification: Notification) => {
console.log(JSON.stringify(notification.data));
});
registerRemoteNotificationsRegistrationFailed
registerRemoteNotificationsRegistrationFailed
Notifications.events().registerRemoteNotificationsRegistrationFailed(() => {
});