diff --git a/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java b/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java index db9eabaa4..90969b273 100644 --- a/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java +++ b/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java @@ -88,8 +88,10 @@ public void getInitialNotification(final Promise promise) { return; } - InitialNotificationHolder.getInstance().clear(); result = Arguments.fromBundle(notification.asBundle()); + InitialNotificationHolder.getInstance().clear(); + } catch (NullPointerException e) { + Log.e(LOGTAG, "getInitialNotification: Null pointer exception"); } finally { promise.resolve(result); } diff --git a/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/ReactAppLifecycleFacade.java b/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/ReactAppLifecycleFacade.java index fae61575d..91c714195 100644 --- a/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/ReactAppLifecycleFacade.java +++ b/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/ReactAppLifecycleFacade.java @@ -47,7 +47,7 @@ public synchronized boolean isReactInitialized() { return false; } - return mReactContext.hasActiveCatalystInstance(); + return mReactContext.hasActiveReactInstance(); } @Override