Use account id as group id

This commit is contained in:
M66B
2019-06-08 09:51:00 +02:00
parent 183bb1b7a9
commit 9a9ebeb79c
4 changed files with 14 additions and 10 deletions

View File

@@ -110,13 +110,13 @@ public class EntityAccount extends EntityOrder implements Serializable {
void createNotificationChannel(Context context) {
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannelGroup group = new NotificationChannelGroup(name, name);
NotificationChannelGroup group = new NotificationChannelGroup("group." + id, name);
nm.createNotificationChannelGroup(group);
NotificationChannel channel = new NotificationChannel(
getNotificationChannelId(id), name,
NotificationManager.IMPORTANCE_HIGH);
channel.setGroup(name);
channel.setGroup(group.getId());
channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
channel.enableLights(true);
nm.createNotificationChannel(channel);