title: Setting push notification icon for various Android OS versions
body: <p>I have 5 test Android phones, each running a different version of OS (5.1, 6.1, 7.1,8 and 9).  I get one of two different push notification icons to display - depending on OS version.  My app icon is a hexagonal shape.</p>
  
  <blockquote>
    <p>Samsung Grand Prime, 5.1.1 = real app icon - with colors</p>
    
    <p>Samsung Galaxy S5, 6.0.1 = real app icon - with colors</p>
    
    <p>LG K20 Plus, 7.0 = white hexagonal icon </p>
    
    <p>LG K20 Plus, 8.0 = white hexagonal icon </p>
    
    <p>Google Pixel 3a, 9.0 = white hexagonal icon</p>
  </blockquote>
  
  <p>I am using cordova-plugin-firebasex (<a href="https://github.com/dpa99c/cordova-plugin-firebasex#android-notification-icons" rel="nofollow noreferrer">https://github.com/dpa99c/cordova-plugin-firebasex#android-notification-icons</a>) and created all the appropriate <code>notification_icon</code>s in the respective drawable folders (mdpi/hdpi/xdpi/xxhdpi/xxxhdpi) - the icons are all mini versions of my real app icon (with colors).  I have read in many threads/blogs that above Lollipop (5.0) real app/color Icons are not possible for push notifications.  However I have my real app/colored icon displaying as the push notification icon on the Android 5.1.1 and 6.1 test phones.</p>
  
  <p>My questions are as follows:</p>
  
  <ol>
  <li><p>If Android 5 and above are only transparent push notification icons - then how are those two test phones showing the real colored icon?</p></li>
  <li><p>Is my understanding of this correct...OR is it possible to get real app icon to appear as push notification icon for Android 7, 8 and 9?  If so...how?  What else must I do beyond the standard steps defined in the above (also below) Firebasex directions?</p></li>
  <li><p>If not possible...can anyone answer WHY Google stopped supporting color/real app push notification icons?  iOS supports mini app icons as the push notification icon through all rev of their OS. The colored icons really help users know exactly what app just notified them without having to take any further action.  A white icon is typically not very recognizable and makes it harder to discern which app just sent the message</p></li>
  <li><p>If its not possible, then I will need to create transparent icons for 7, 8 &amp; 9 - but how can I have the lower versions still show the real app icons and the uppers versions show the transparent icons? I have one base config.xml - what internal code would I need to add to test for different versions to supply real icon vs transparent icon?</p></li>
  </ol>
  
  <p>The current <code>config.xml</code> configuration is to define push notification icons is:</p>
  
  <pre><code>&lt;platform name="android"&gt;
      &lt;resource-file src="res/android/drawable-mdpi/notification_icon.png" target="app/src/main/res/drawable-mdpi/notification_icon.png" /&gt;
      &lt;resource-file src="res/android/drawable-hdpi/notification_icon.png" target="app/src/main/res/drawable-hdpi/notification_icon.png" /&gt;
      &lt;resource-file src="res/android/drawable-xhdpi/notification_icon.png" target="app/src/main/res/drawable-xhdpi/notification_icon.png" /&gt;
      &lt;resource-file src="res/android/drawable-xxhdpi/notification_icon.png" target="app/src/main/res/drawable-xxhdpi/notification_icon.png" /&gt;
      &lt;resource-file src="res/android/drawable-xxxhdpi/notification_icon.png" target="app/src/main/res/drawable-xxxhdpi/notification_icon.png" /&gt;
      &lt;config-file target="AndroidManifest.xml" parent="/manifest/application"&gt;
          &lt;meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/notification_icon" /&gt;
      &lt;/config-file&gt;
  &lt;/platform&gt;
  </code></pre>
  
  <p>Again, the <code>notification_icon</code> in each of the drawable folders is an appropriate sized mini version of my real app/colored icon.</p>