From 4cd72c4843e1bd5fb3cf6d5f84c18f826e0f5bc4 Mon Sep 17 00:00:00 2001 From: yogevbd Date: Sun, 3 Feb 2019 22:12:47 +0200 Subject: [PATCH] Fix push receiving from dead state --- .../core/notification/PushNotification.java | 10 ---------- package.json | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/android/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java b/android/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java index 3ea5eb3..356faed 100644 --- a/android/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java +++ b/android/src/main/java/com/wix/reactnativenotifications/core/notification/PushNotification.java @@ -92,7 +92,6 @@ public class PushNotification implements IPushNotification { protected void digestNotification() { if (!mAppLifecycleFacade.isReactInitialized()) { setAsInitialNotification(); - launchOrResumeApp(); return; } @@ -122,10 +121,6 @@ public class PushNotification implements IPushNotification { protected void dispatchUponVisibility() { mAppLifecycleFacade.addVisibilityListener(getIntermediateAppVisibilityListener()); - - // Make the app visible so that we'll dispatch the notification opening when visibility changes to 'true' (see - // above listener registration). - launchOrResumeApp(); } protected AppVisibilityListener getIntermediateAppVisibilityListener() { @@ -197,9 +192,4 @@ public class PushNotification implements IPushNotification { private void notifyOpenedToJS() { mJsIOHelper.sendEventToJS(NOTIFICATION_OPENED_EVENT_NAME, mNotificationProps.asBundle(), mAppLifecycleFacade.getRunningReactContext()); } - - protected void launchOrResumeApp() { - final Intent intent = mAppLaunchHelper.getLaunchIntent(mContext); - mContext.startActivity(intent); - } } diff --git a/package.json b/package.json index 14ea3bc..6fb9d90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-notifications", - "version": "1.2.4", + "version": "1.2.5", "description": "Advanced Push Notifications (Silent, interactive notifications) for iOS & Android", "author": "Lidan Hifi ", "license": "MIT", -- 2.26.2