move generic-notification-id to NotificationCenter to keep the overview

This commit is contained in:
B. Petersen
2020-09-03 18:50:09 +02:00
parent 390ccc4923
commit 6fa07b99fa
2 changed files with 2 additions and 2 deletions
@@ -149,6 +149,7 @@ public class NotificationCenter {
public static final int ID_PERMANTENT = 1;
public static final int ID_MSG_SUMMARY = 2;
public static final int ID_GENERIC = 3;
public static final int ID_MSG_OFFSET = 0; // msgId is added - as msgId start at 10, there are no conflicts with lower numbers
@@ -32,7 +32,6 @@ public final class GenericForegroundService extends Service {
private final IBinder binder = new LocalBinder();
private static final int NOTIFICATION_ID = 849319618;
private static final String EXTRA_TITLE = "extra_title";
private static final String EXTRA_CONTENT_TEXT = "extra_content_text";
private static final String EXTRA_CHANNEL_ID = "extra_channel_id";
@@ -109,7 +108,7 @@ public final class GenericForegroundService extends Service {
private void postObligatoryForegroundNotification(@NonNull Entry active) {
lastPosted = active;
startForeground(NOTIFICATION_ID, new Builder(this, active.channelId)
startForeground(NotificationCenter.ID_GENERIC, new Builder(this, active.channelId)
.setSmallIcon(active.iconRes)
.setContentTitle(active.title)
.setTicker(active.contentText)