title: Firebase Notification is not working on Android O
body: <p>I'm using Android O Emulator and want to get notification from Firebase console.It is working fine on every device except Android O. I'm getting this Error in Log.</p>
  
  <pre><code>W/Notification: Use of stream types is deprecated for operations other than volume control
  W/Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
  </code></pre>
  
  <p>I know that I have to specify Channel id for that . 
  So What I have done so far </p>
  
  <p><strong>AndroidManifest.xml</strong></p>
  
  <pre><code>     &lt;application
              android:allowBackup="true"
              android:icon="@mipmap/ic_launcher"
              android:label="@string/app_name"
              android:largeHeap="true"
              android:roundIcon="@mipmap/ic_launcher_round"
              android:supportsRtl="true"
              android:theme="@style/AppTheme"&gt;
  
              &lt;meta-data
                  android:name="com.google.firebase.messaging.default_notification_icon"
                  android:resource="@drawable/attach" /&gt;
  
  
              &lt;meta-data
                  android:name="com.google.firebase.messaging.default_notification_color"
                  android:resource="@color/colorAccent" /&gt;
  
              &lt;meta-data
                  android:name="com.google.firebase.messaging.default_notification_channel_id"
                  android:value="my_notification_channel" /&gt;
  
              &lt;service android:name=".Helper.FirebaseIDService"&gt;
                  &lt;intent-filter&gt;
                      &lt;action android:name="com.google.firebase.INSTANCE_ID_EVENT" /&gt;
                  &lt;/intent-filter&gt;
              &lt;/service&gt;
  
              &lt;service android:name=".Helper.MyFirebaseMessagingService"&gt;
                  &lt;intent-filter&gt;
                      &lt;action android:name="com.google.firebase.MESSAGING_EVENT" /&gt;
                  &lt;/intent-filter&gt;
              &lt;/service&gt;
  
         &lt;my all activities...&gt;
  </code></pre>
  
  <p>I've also specify channel id in <strong>FirebaseMessagingService</strong> like this </p>
  
  <pre><code> public class MyFirebaseMessagingService extends FirebaseMessagingService {
      private static final String TAG = "FCM Service";
      private static final int NOTIFICATION_ID = 1;
      private static final String NOTIFICATION_CHANNEL_ID = "my_notification_channel";
  
      @Override
      public void onMessageReceived(RemoteMessage remoteMessage) {
  
          Log.d(TAG, "From: " + remoteMessage.getFrom());
          Log.d(TAG, "Notification Message Body: " + remoteMessage.getNotification().getBody());
  
  NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
  
          if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.O) {
              NotificationChannel notificationChannel = new NotificationChannel(NOTIFICATION_CHANNEL_ID, "My Notifications", NotificationManager.IMPORTANCE_DEFAULT);
  
              // Configure the notification channel.
              notificationChannel.setDescription("Channel description");
              notificationChannel.enableLights(true);
              notificationChannel.setLightColor(Color.RED);
              notificationChannel.setVibrationPattern(new long[]{0, 1000, 500, 1000});
              notificationChannel.enableVibration(true);
              notificationManager.createNotificationChannel(notificationChannel);
          }
  
  
          NotificationCompat.Builder mBuilder;
          mBuilder = new NotificationCompat.Builder(getApplicationContext())
                  .setSmallIcon(R.mipmap.ic_launcher)
                  .setContentTitle("Title")
                  .setContentText(remoteMessage.getNotification().getBody())
                  .setOngoing(true)
                  .setChannelId(NOTIFICATION_CHANNEL_ID);
  
          notificationManager.notify(NOTIFICATION_ID, mBuilder.build());
   }
  }
  </code></pre>
  
  <p>So after doing all this . I still got that error message in log and can't receive notification from console.Any Help would be appreciable.</p>