title: Android 8 notification channel for a foreground service
body: <p>I wonder if the following modification of my notification creation source is in accordance with Android 8.
  <em>Before:</em></p>
  
  <pre><code>Notification.Builder builder = new Notification.Builder(this);
  // ... (some code omitted)
  myNotification = builder.build();
  // ... (some code omitted)
  startForeground(MY_NOTIFICATION_ID, myNotification);
  </code></pre>
  
  <p><em>After:</em></p>
  
  <pre><code>Notification.Builder builder;
  if ( Build.VERSION.SDK_INT &lt; 26 ) {
      builder = new Notification.Builder(this);
  } else {
      final String ChannelId = "mypackage.NotificationChannelID";
      final CharSequence ChannelName = "My Notification";
      NotificationChannel channel = new NotificationChannel(ChannelId, ChannelName, NotificationManager.IMPORTANCE_LOW);
      ((NotificationManager)this.getSystemService(Context.NOTIFICATION_SERVICE)).
          createNotificationChannel(channel);
      builder = new Notification.Builder(this, ChannelId);
  }
  // ... (some code omitted)
  myNotification = builder.build();
  // ... (some code omitted)
  startForeground(MY_NOTIFICATION_ID, myNotification);
  </code></pre>
  
  <p>Especially, there remain at least two questions: </p>
  
  <p>(1) I wonder if and where to add <code>void deleteNotificationChannel(String channelId)</code> to not produce any memory leak?</p>
  
  <p>(2) Should I add <code>builder.setCategory(Notification.CATEGORY_SERVICE)</code> and if yes why?</p>