title: Change push notification icon (FCM) in Xamarin
body: <p>I am trying to do Push Notifications with Xamarin.Forms (Android) and FCM from this <a href="https://www.youtube.com/watch?v=7w2q2D6mR7g&amp;list=PLfbOp004UaYX5B2pKKp5j7QPniyLMPkSO" rel="nofollow noreferrer">tutorial</a> , <a href="https://github.com/jfversluis/XFFCMPushNotificationsSample" rel="nofollow noreferrer">code</a></p>
  <p>Everything seems fine. However I am trying to change the notification icon. This is not in the tutorial.</p>
  <p>I added this in AndroidManifest.xml</p>
  <pre><code>&lt;meta-data android:name=&quot;com.google.firebase.messaging.default_notification_icon&quot; android:resource=&quot;@drawable/ic_notification&quot; /&gt;
  </code></pre>
  <p>I created icons <code>ic_notification.png</code> and added folders:</p>
  <pre><code>Resources/drawable-mdpi/ (24x24)
  Resources/drawable-hdpi/ (36x36)
  Resources/drawable-xhdpi/ (48x48)
  Resources/drawable-xxhdpi/ (72x72)
  Resources/drawable-xxxhdpi/ (96x96)
  </code></pre>
  <p>However it still doesn't work. How can I change ico notification (FCM)? Thanks for the solutions!</p>
  <p><a href="https://i.stack.imgur.com/KpmFH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KpmFH.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/pWvCH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pWvCH.png" alt="enter image description here" /></a></p>
  <p><strong>Update</strong>
  In Project Android. I created Application.cs</p>
  <pre><code>[Application]
  public class MainApplication : Application
  {
      public MainApplication(IntPtr handle, JniHandleOwnership transer) : base(handle, transer)
      {
      }
  
      public override void OnCreate()
      {
          base.OnCreate();
  
          //Set the default notification channel for your app when running Android Oreo
          if (Build.VERSION.SdkInt &gt;= Android.OS.BuildVersionCodes.O)
          {
              //Change for your default notification channel id here
              FirebasePushNotificationManager.DefaultNotificationChannelId = &quot;FirebasePushNotificationChannelVenus&quot;;
  
              //Change for your default notification channel name here
              FirebasePushNotificationManager.DefaultNotificationChannelName = &quot;General&quot;;
  
              FirebasePushNotificationManager.DefaultNotificationChannelImportance = NotificationImportance.Max;
          }
  
          //If debug you should reset the token each time.
     #if DEBUG
          FirebasePushNotificationManager.Initialize(this, true);
     #else
          FirebasePushNotificationManager.Initialize(this, false);
     #endif
  
          //Handle notification when app is closed here
          CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) =&gt;
          {
          };
      }
  }
  </code></pre>
  <p>MainActivity.cs</p>
  <p>I add in OnCreate:</p>
  <pre><code>FirebasePushNotificationManager.ProcessIntent(this, Intent);
  </code></pre>
  <p>App.xaml.cs</p>
  <pre><code>public App()
  {
     ....
     CrossFirebasePushNotification.Current.Subscribe(&quot;all&quot;);
     CrossFirebasePushNotification.Current.OnTokenRefresh += Current_OnTokenRefresh;
  }
  
  private void Current_OnTokenRefresh(object source, FirebasePushNotificationTokenEventArgs e)
  {
     System.Diagnostics.Debug.WriteLine($&quot;Token: {e.Token}&quot;);
  }
  </code></pre>