Simplified alert handling

This commit is contained in:
M66B
2019-12-10 11:51:03 +01:00
parent 46d5289756
commit 4b30caee1f
8 changed files with 71 additions and 49 deletions

View File

@@ -244,14 +244,14 @@ public class ApplicationEx extends Application {
nm.createNotificationChannel(update);
}
// Warn
// Warnings
NotificationChannel warning = new NotificationChannel(
"warning", getString(R.string.channel_warning),
NotificationManager.IMPORTANCE_HIGH);
warning.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
nm.createNotificationChannel(warning);
// Error
// Errors
NotificationChannel error = new NotificationChannel(
"error",
getString(R.string.channel_error),
@@ -259,6 +259,14 @@ public class ApplicationEx extends Application {
error.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
nm.createNotificationChannel(error);
// Server alerts
NotificationChannel alerts = new NotificationChannel(
"alerts",
getString(R.string.channel_alert),
NotificationManager.IMPORTANCE_HIGH);
alerts.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
nm.createNotificationChannel(alerts);
// Contacts grouping
NotificationChannelGroup group = new NotificationChannelGroup(
"contacts",