diff --git a/app/src/main/java/net/foucry/pilldroid/NotificationPublisher.java b/app/src/main/java/net/foucry/pilldroid/NotificationPublisher.java index 0724610..a59a367 100644 --- a/app/src/main/java/net/foucry/pilldroid/NotificationPublisher.java +++ b/app/src/main/java/net/foucry/pilldroid/NotificationPublisher.java @@ -55,6 +55,7 @@ public class NotificationPublisher extends BroadcastReceiver { .setChannelId(APP_NAME) .setStyle(new NotificationCompat.BigTextStyle() .bigText(context.getString(R.string.pharmacy))) + .setAutoCancel(true) .setPriority(NotificationCompat.PRIORITY_DEFAULT); if (isEnableSound) { @@ -62,6 +63,7 @@ public class NotificationPublisher extends BroadcastReceiver { builder.setSound(alarmSound); } + notificationManager.notify(notificationId, builder.build()); }