How to use the react-native-onesignal.requestPermissions function in react-native-onesignal

To help you get started, we’ve selected a few react-native-onesignal 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 hummingbird-me / kitsu-mobile / src / screens / Notifications / NotificationsScreen / index.js View on Github external
componentDidMount() {
    // for once, and listener will invoke afterwards.
    OneSignal.requestPermissions({ alert: true, sound: true, badge: true });

    // Setup notification intervals
    this.fetchNotifications();
    this.notificationInterval = setInterval(this.fetchNotifications, NOTIFICATION_FETCH_INTERVAL);
  }
github flow-typed / flow-typed / definitions / npm / react-native-onesignal_v3.x.x / flow_v0.104.x- / test_react-native-onesignal.js View on Github external
it('must call requestPermissions with Permissions', () => {
    OneSignal.requestPermissions({
      alert: true,
      badge: true,
      sound: true,
    });
    OneSignal.requestPermissions({
      alert: false,
      badge: false,
    });

    OneSignal.requestPermissions({
      alert: false,
    });

    OneSignal.requestPermissions();
  });
github flow-typed / flow-typed / definitions / npm / react-native-onesignal_v3.x.x / flow_v0.69.0-v0.103.x / test_react-native-onesignal.js View on Github external
it("must call requestPermissions with Permissions", () => {
    OneSignal.requestPermissions({
      alert: true,
      badge: true,
      sound: true
    });
    OneSignal.requestPermissions({
      alert: false,
      badge: false
    });

    OneSignal.requestPermissions({
      alert: false
    });

    OneSignal.requestPermissions();
  });
github hummingbird-me / kitsu-mobile / src / App.js View on Github external
componentDidMount() {
    OneSignal.requestPermissions({ alert: true, sound: true, badge: true });
    store.dispatch(fetchAlgoliaKeys());
  }
github hummingbird-me / kitsu-mobile / src / screens / Notifications / NotificationsScreen / index.js View on Github external
handleActionBtnPress = () => {
    if (Platform.OS === 'ios') {
      OneSignal.requestPermissions({ alert: true, sound: true, badge: true });
    }
  };