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.

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);
        }
    }