diff --git a/android/capacitor/src/main/java/com/getcapacitor/plugin/notification/LocalNotificationManager.java b/android/capacitor/src/main/java/com/getcapacitor/plugin/notification/LocalNotificationManager.java index 202de9d80e..d23d4dd961 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/plugin/notification/LocalNotificationManager.java +++ b/android/capacitor/src/main/java/com/getcapacitor/plugin/notification/LocalNotificationManager.java @@ -176,9 +176,9 @@ private void buildNotification(NotificationManagerCompat notificationManager, Lo } // make sure scheduled time is shown instead of display time - if (localNotification.isScheduled()) { + if (localNotification.isScheduled() && localNotification.getSchedule().getAt() != null) { mBuilder.setWhen(localNotification.getSchedule().getAt().getTime()) - .setShowWhen(true); + .setShowWhen(true); } mBuilder.setVisibility(NotificationCompat.VISIBILITY_PRIVATE);