mirror of
https://github.com/zhigang1992/react-native-notifications.git
synced 2026-06-11 00:08:50 +08:00
928 B
Executable File
928 B
Executable File
id, title, sidebar_label
| id | title | sidebar_label |
|---|---|---|
| general-api | General Commands | General |
getInitialNotification
Return the notification that caused the app to launch from dead state.
const notification: Notification = await Notifications.getInitialNotification();
postLocalNotification(notification, id?)
Posts local notification to the device notification center.
Notifications.postLocalNotification({
body: 'Local notificiation!',
title: 'Local Notification Title',
sound: 'chime.aiff',
category: 'SOME_CATEGORY',
link: 'localNotificationLink',
fireDate: new Date()
}, id);
cancelLocalNotification(id)
Relevant for notifications sent with fireDate.
Notifications.cancelLocalNotification(id);
isRegisteredForRemoteNotifications()
Check if the app has permissions to send remote notifications.
const hasPermissions: boolean = await Notifications.getInitialNotification();