diff --git a/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java b/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java index a249c6ad3..53b4030e2 100644 --- a/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java +++ b/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java @@ -95,11 +95,13 @@ private void callOnOpenedIfNeed(Activity activity) { Intent intent = activity.getIntent(); if (NotificationIntentAdapter.canHandleIntent(intent)) { Context appContext = mApplication.getApplicationContext(); - Bundle notificationData = NotificationIntentAdapter.canHandleTrampolineActivity(appContext) ? - intent.getExtras() : NotificationIntentAdapter.extractPendingNotificationDataFromIntent(intent); + Bundle notificationData = intent.getExtras(); final IPushNotification pushNotification = PushNotification.get(appContext, notificationData); if (pushNotification != null) { pushNotification.onOpened(); + // Erase notification intent after using it, to avoid looping with the same notification + // in case the app is moved to background and opened again + activity.setIntent(new Intent()); } } }