Added announcements

This commit is contained in:
M66B
2023-01-08 12:29:30 +01:00
parent 16baa2a336
commit 244f3e58ee
6 changed files with 256 additions and 8 deletions

View File

@@ -106,14 +106,22 @@ class NotificationHelper {
progress.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
nm.createNotificationChannel(progress);
// Update
if (!Helper.isPlayStoreInstall()) {
// Update
NotificationChannel update = new NotificationChannel(
"update", context.getString(R.string.channel_update),
NotificationManager.IMPORTANCE_HIGH);
update.setSound(null, Notification.AUDIO_ATTRIBUTES_DEFAULT);
update.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
nm.createNotificationChannel(update);
// Announcements
NotificationChannel announcements = new NotificationChannel(
"announcements", context.getString(R.string.channel_announcements),
NotificationManager.IMPORTANCE_HIGH);
announcements.setSound(null, Notification.AUDIO_ATTRIBUTES_DEFAULT);
announcements.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
nm.createNotificationChannel(announcements);
}
// Warnings