How to use the react-native-onesignal.setSubscription 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 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 setSubscription with boolean', () => {
    OneSignal.setSubscription(true);
    OneSignal.setSubscription(false);
    // $ExpectError
    OneSignal.setSubscription();
  });
  it('must call inFocusDisplaying with FocusBehaviors type', () => {
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 setSubscription with boolean", () => {
    OneSignal.setSubscription(true);
    OneSignal.setSubscription(false);
    // $ExpectError
    OneSignal.setSubscription();
  });
  it("must call inFocusDisplaying with FocusBehaviors type", () => {
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 setSubscription with boolean', () => {
    OneSignal.setSubscription(true);
    OneSignal.setSubscription(false);
    // $ExpectError
    OneSignal.setSubscription();
  });
  it('must call inFocusDisplaying with FocusBehaviors type', () => {
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 setSubscription with boolean", () => {
    OneSignal.setSubscription(true);
    OneSignal.setSubscription(false);
    // $ExpectError
    OneSignal.setSubscription();
  });
  it("must call inFocusDisplaying with FocusBehaviors type", () => {
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 setSubscription with boolean", () => {
    OneSignal.setSubscription(true);
    OneSignal.setSubscription(false);
    // $ExpectError
    OneSignal.setSubscription();
  });
  it("must call inFocusDisplaying with FocusBehaviors type", () => {
github Flaque / quirk / src / onboarding / OnboardingScreen.tsx View on Github external
onPress={() => {
              stats.userTurnedOnNotifications();
              if (Platform.OS === "ios") {
                OneSignal.registerForPushNotifications();
              }
              OneSignal.setSubscription(true);
              onContinue();
            }}
          />
github StoDevX / AAO-React-Native / source / redux / parts / notifications.js View on Github external
function enable(): EnableNotificationsAction {
	OneSignal.setSubscription(true)
	return {type: ENABLE}
}
github Flaque / quirk / src / onboarding / NotificationScreen.tsx View on Github external
onPress={() => {
                userTurnedOnNotifications();
                if (Platform.OS === "ios") {
                  OneSignal.registerForPushNotifications();
                }
                OneSignal.setSubscription(true);
                this.onContinue();
              }}
            />
github Flaque / quirk / src / SettingsScreen.tsx View on Github external
onPress={() => {
                  if (Platform.OS === "ios") {
                    OneSignal.registerForPushNotifications();
                  }
                  OneSignal.setSubscription(true);
                  this.setState({
                    areNotificationsOn: true,
                  });
                  stats.userTurnedOnNotifications();
                }}
              />
github StoDevX / AAO-React-Native / source / redux / parts / notifications.js View on Github external
function disable(): DisableNotificationsAction {
	OneSignal.setSubscription(false)
	return {type: DISABLE}
}