How to use the react-native-notifications.localNotification function in react-native-notifications

To help you get started, we’ve selected a few react-native-notifications examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mattermost / mattermost-mobile / app / push_notifications / push_notifications.ios.js View on Github external
localNotification(notification) {
        this.deviceNotification = {
            body: notification.message,
            alertAction: '',
            userInfo: notification.userInfo,
        };

        NotificationsIOS.localNotification(this.deviceNotification);
    }
github CMP-Studio / DawnChorus / app / actions / notifications.js View on Github external
function createiOSNotification(bird, index, date, alarm) {
  NotificationsIOS.localNotification({
    alertTitle: 'Dawn Chorus Alarm',
    category: 'ALARM',
    alertBody: `A ${bird.name} ${tweetyStrings[index]}!`,
    alertAction: 'Tap to hear chorus.',
    soundName: bird.sound.iosNotification,
    fireDate: date.toDate().toISOString(),
    userInfo: { alarmUUID: alarm.uuid },
  }, alarm.uuid.toString());

  return;
}
github mattermost / mattermost-mobile / app / push_notifications / push_notifications.ios.js View on Github external
localNotificationSchedule(notification) {
        if (notification.date) {
            const deviceNotification = {
                fireDate: notification.date.toISOString(),
                body: notification.message,
                alertAction: '',
                userInfo: notification.userInfo,
            };

            NotificationsIOS.localNotification(deviceNotification);
        }
    }

react-native-notifications

Advanced Push Notifications (Silent, interactive notifications) for iOS & Android

MIT
Latest version published 1 year ago

Package Health Score

65 / 100
Full package analysis