How to use the react-native-notifications.consumeBackgroundQueue 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 demokratie-live / democracy-client / src / hocs / PushNotifications.js View on Github external
componentDidMount() {
      switch (Platform.OS) {
        case 'ios':
          // console.log('PUSHLOG: NotificationsIOS.consumeBackgroundQueue();');
          NotificationsIOS.consumeBackgroundQueue();
          break;

        default:
          break;
      }
    }
github CMP-Studio / DawnChorus / app / actors / notifications.ios.js View on Github external
});

    this.alarmActions = new NotificationCategory({
      identifier: 'ALARM',
      actions: [this.snoozeAction, this.stopAction],
      context: 'default',
    });

    this.requestPermissions().then(() => {
      this.checkStatus().catch(() => {
        this.checkStatus();
      });
    });

    // consume actions
    NotificationsIOS.consumeBackgroundQueue();
    // consume notifications
    PushNotificationIOS.getInitialNotification(0).then((notification) => {
      if (notification !== null) {
        this.dispatch(snoozeAlarm(notification.getData().alarmUUID));
      }
    });
  }
github JetBrains / youtrack-mobile / src / components / push-notifications / push-notifications.ios.js View on Github external
export function initializePushNotifications() {
  // $FlowFixMe: error in type annotations of library
  NotificationsIOS.requestPermissions();
  NotificationsIOS.consumeBackgroundQueue();
}

react-native-notifications

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

MIT
Latest version published 8 months ago

Package Health Score

72 / 100
Full package analysis