List of usage examples for android.app NotificationChannelGroup getId
public String getId()
From source file:com.irccloud.android.data.collection.NotificationsList.java
public void pruneNotificationChannels() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { NotificationManager nm = ((NotificationManager) IRCCloudApplication.getInstance() .getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE)); for (NotificationChannelGroup c : nm.getNotificationChannelGroups()) { try { if (ServersList.getInstance().getServer(Integer.valueOf(c.getId())) == null) nm.deleteNotificationChannelGroup(c.getId()); } catch (NumberFormatException e) { }//w w w.j av a 2 s. c o m } for (NotificationChannel c : nm.getNotificationChannels()) { try { if (BuffersList.getInstance().getBuffer(Integer.valueOf(c.getId())) == null) nm.deleteNotificationChannel(c.getId()); } catch (NumberFormatException e) { } } } }