diff --git a/android/src/main/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java b/android/src/main/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java index 38b9fec25c5d2d876587293cc0b011e39ca28db5..eca899afc0f6e38788bb525bf97a540aab3ce632 100644 --- a/android/src/main/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java +++ b/android/src/main/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java @@ -186,10 +186,12 @@ public class FIRLocalMessagingHelper { notification.setDefaults(NotificationCompat.DEFAULT_LIGHTS); } - Log.d(TAG, "broadcast intent before showing notification"); - Intent i = new Intent("com.evollu.react.fcm.ReceiveLocalNotification"); - i.putExtras(bundle); - mContext.sendOrderedBroadcast(i, null); + if(bundle.containsKey("fire_date")) { + Log.d(TAG, "broadcast intent if it is a scheduled notification"); + Intent i = new Intent("com.evollu.react.fcm.ReceiveLocalNotification"); + i.putExtras(bundle); + mContext.sendOrderedBroadcast(i, null); + } if(!mIsForeground || bundle.getBoolean("show_in_foreground")){ Intent intent = new Intent();