title: NotificationCompat.Builder deprecated in Android O
body: <p>After upgrading my project to <strong>Android O</strong></p>
  
  <pre><code>buildToolsVersion "26.0.1"
  </code></pre>
  
  <p>Lint in Android Studio is showing a deprecated warning for the follow notification builder method:</p>
  
  <pre><code>new NotificationCompat.Builder(context)
  </code></pre>
  
  <p><strong>The problem is:</strong> Android Developers update their Documentation describing <strong>NotificationChannel</strong> to support notifications in Android O, and provide us with a snippet, yet with the same deprecated warning:</p>
  
  <pre><code>Notification notification = new Notification.Builder(MainActivity.this)
          .setContentTitle("New Message")
          .setContentText("You've received new messages.")
          .setSmallIcon(R.drawable.ic_notify_status)
          .setChannelId(CHANNEL_ID)
          .build();  
  </code></pre>
  
  <p><a href="https://developer.android.com/preview/features/notification-channels.html" rel="noreferrer">Notifications Overview</a></p>
  
  <p><strong>My question:</strong> Is there is any other solution for building notification, and still support Android O?</p>
  
  <p>A solution I found is to pass the channel ID as a parameter in Notification.Builder constructor. But this solution is not exactly reusable.</p>
  
  <pre><code>new Notification.Builder(MainActivity.this, "channel_id")
  </code></pre>