How to use the react-native-push-notification.cancelLocalNotifications function in react-native-push-notification

To help you get started, we’ve selected a few react-native-push-notification 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 zo0r / react-native-push-notification / example / NotifService.js View on Github external
cancelNotif() {
    PushNotification.cancelLocalNotifications({id: ''+this.lastId});
  }
github open-app / app-hub-mobile / src / utils / pushNotificationConfig.js View on Github external
const cancelNotification = id => PushNotification.cancelLocalNotifications({id })
github CMP-Studio / DawnChorus / app / actions / notifications.js View on Github external
export function clearNotifications(alarm) {
  if (Platform.OS === 'ios') {
    NotificationsIOS.cancelLocalNotification(alarm.uuid.toString());
  } else if (Platform.OS === 'android') {
    PushNotification.cancelLocalNotifications({ alarmUUID: alarm.uuid });
    PushNotification.clearAllNotifications();
  }
  return (Object.assign({}, alarm, { notifications: [] }));
}