Small refactoring, add setAutoCancel(true)

This commit is contained in:
jacques 2020-08-15 22:04:03 +02:00
parent a66daa3d4f
commit f92c861764

View file

@ -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());
}