|
|
@ -281,25 +281,29 @@ public class ApplicationEx extends Application {
|
|
|
|
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
|
|
|
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
|
|
|
|
|
|
|
|
|
|
|
NotificationChannel service = new NotificationChannel(
|
|
|
|
NotificationChannel service = new NotificationChannel(
|
|
|
|
"service",
|
|
|
|
"service", getString(R.string.channel_service),
|
|
|
|
getString(R.string.channel_service),
|
|
|
|
|
|
|
|
NotificationManager.IMPORTANCE_MIN);
|
|
|
|
NotificationManager.IMPORTANCE_MIN);
|
|
|
|
service.setSound(null, Notification.AUDIO_ATTRIBUTES_DEFAULT);
|
|
|
|
service.setSound(null, Notification.AUDIO_ATTRIBUTES_DEFAULT);
|
|
|
|
service.setShowBadge(false);
|
|
|
|
service.setShowBadge(false);
|
|
|
|
service.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
|
|
|
|
service.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
|
|
|
|
nm.createNotificationChannel(service);
|
|
|
|
nm.createNotificationChannel(service);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NotificationChannel send = new NotificationChannel(
|
|
|
|
|
|
|
|
"send", getString(R.string.channel_send),
|
|
|
|
|
|
|
|
NotificationManager.IMPORTANCE_HIGH);
|
|
|
|
|
|
|
|
send.setSound(null, Notification.AUDIO_ATTRIBUTES_DEFAULT);
|
|
|
|
|
|
|
|
send.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
|
|
|
|
|
|
|
nm.createNotificationChannel(send);
|
|
|
|
|
|
|
|
|
|
|
|
NotificationChannel notification = new NotificationChannel(
|
|
|
|
NotificationChannel notification = new NotificationChannel(
|
|
|
|
"notification",
|
|
|
|
"notification", getString(R.string.channel_notification),
|
|
|
|
getString(R.string.channel_notification),
|
|
|
|
|
|
|
|
NotificationManager.IMPORTANCE_HIGH);
|
|
|
|
NotificationManager.IMPORTANCE_HIGH);
|
|
|
|
notification.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
|
|
|
notification.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
|
|
|
notification.enableLights(true);
|
|
|
|
notification.enableLights(true);
|
|
|
|
nm.createNotificationChannel(notification);
|
|
|
|
nm.createNotificationChannel(notification);
|
|
|
|
|
|
|
|
|
|
|
|
NotificationChannel warning = new NotificationChannel(
|
|
|
|
NotificationChannel warning = new NotificationChannel(
|
|
|
|
"warning",
|
|
|
|
"warning", getString(R.string.channel_warning),
|
|
|
|
getString(R.string.channel_warning),
|
|
|
|
|
|
|
|
NotificationManager.IMPORTANCE_HIGH);
|
|
|
|
NotificationManager.IMPORTANCE_HIGH);
|
|
|
|
warning.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
|
|
|
warning.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
|
|
|
nm.createNotificationChannel(warning);
|
|
|
|
nm.createNotificationChannel(warning);
|
|
|
|