diff --git a/android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java b/android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java index 0565cdc2..811a8632 100644 --- a/android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java +++ b/android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java @@ -48,7 +48,7 @@ public class RNOneSignal extends ReactContextBaseJavaModule implements Lifecycle private ReactApplicationContext mReactApplicationContext; private ReactContext mReactContext; private boolean oneSignalInitDone; - private static boolean registeredEvents = false; + private boolean registeredEvents = false; //ensure only one callback exists at a given time due to react-native restriction private Callback pendingGetTagsCallback; @@ -434,7 +434,8 @@ public String getName() { @Override public void onHostDestroy() { - + OneSignal.removeNotificationOpenedHandler(); + OneSignal.removeNotificationReceivedHandler(); } @Override