FCM Notification icon

I use FCM notificatoin. It works but when the notification comes I have no icon. I know that I can push 'icon' => 'someicon' to FCM service but what should I put into someicon? I my app I have platforms/android/res/mipmap-xhdpi/icon.png but I also have other folders with the same icon.

HI! Can you share your code for Push Notification with FCM worked?

I tried to find a solution but i can’t since 4 days . I found a lot of issues…

Thanks and Regards,

Did you register on Google FCM?

You need to download google-services.json and put it inside /platforms/android and where you have “package_name” you need to put you package name from config.xml (probably second line - )

This is app.js:
angular.module(‘starter’, [‘ionic’, ‘starter.controllers’, ‘starter.services’])
.run(function($ionicPlatform, $ionicPopup, $state) {

  $ionicPlatform.ready(function() {



          console.log('Notification errpr');


          if (data.wasTapped) {
            // Notification was received on device tray and tapped by the user.
 			// Doesn't work for me 
          } else {
            //Notification was received in foreground. Maybe the user needs to be notified.
            alert("You have some notification:" + data.someValue);


1 Like

You can generate icon here:
After that put it in resources/android/ic_notifications directory
(i.e.: resources/android/ic_notifications/drawable-hdpi/my_icon.png)

In your FCM service set just:
‘icon’ => 'my_icon’
without extension.

1 Like

I generated standard app icion and I have icon in /resources/android/icon/drawable-hdpi-icon.png. Should it be always on ic_notifications folder? Now I just have icon' => 'my_icon but does not work on my phone. On others phones it works - older and newer Android, I have 5.1.1 version.

Hi @hbmedia,

My push notifications works as expected but I have no icon.

Did you get it to work properly?

Does ionic-cli have one way of doing it? (ionic resources)