From 2d584560c5e64a0e15e946e4e0824ad8bf12147a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Fri, 3 Aug 2018 11:26:39 +0200 Subject: [PATCH] Android: on destroy, set this.registeredEvents = false; for android RN restart issue: https://github.com/geektimecoil/react-native-onesignal/issues/583 --- .../main/java/com/geektime/rnonesignalandroid/RNOneSignal.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java b/android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java index 811a8632..e80aa295 100644 --- a/android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java +++ b/android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java @@ -436,6 +436,7 @@ public String getName() { public void onHostDestroy() { OneSignal.removeNotificationOpenedHandler(); OneSignal.removeNotificationReceivedHandler(); + this.registeredEvents = false; } @Override