0

I use "react-native-onesignal": "^3.4.2" in my old project and I noticed when I call such method OneSignal.getPermissionSubscriptionState it returns an object with different values and one of them is notificationsEnabled which is responsible for enabling/disable push notification. For changing this status I use the such function:

    changeSubscriptionStatus(value) {
    if (value == true) {
        OneSignal.init(ONESIGNAL_ID);
    }
    OneSignal.setSubscription(value);
    saveIsSubscribed(value);
},

But it doesn't work and doesn't change the boolean status. So I guess this method OneSignal.setSubscription(value); doesn't work. Do you have any ideas why it can happen?

Please let me know if you needed some more code.

Ismaili Mohamedi
  • 906
  • 7
  • 15

0 Answers0