title: Android: How to disable notification channel programmatically?
body: <p>I have a working implementation, to check if a channel is enabled.</p>
  
  <p>But is there any possible way to <strong>disable</strong> a notification channel programmatically? </p>
  
  <p>How I check if the channel is enabled:</p>
  
  <pre><code>    /**
       * Get the setting a user has applied to the notification channel.
       * If the android API level is &lt; 26, it will return true if all notification
       * are enabled in general, false otherwise.
       *
       * @return true if the channel is enabled, false otherwise
       */
      public static boolean isChannelEnabled(String channelId) {
          if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.O) {
              final NotificationManager notificationManager = App.get().getSystemService(NotificationManager.class);
              if (notificationManager == null) {
                  return true;
              } else {
                  final NotificationChannel c = notificationManager.getNotificationChannel(channelId);
                  final boolean overallEnabled = notificationManager.areNotificationsEnabled();
                  return overallEnabled &amp;&amp; c != null &amp;&amp; NotificationManager.IMPORTANCE_NONE != c.getImportance();
              }
          } else {
              return NotificationManagerCompat.from(App.get()).areNotificationsEnabled();
          }
      }
  
  
  </code></pre>