2

I'm receiving remote notifications successfully on Android, showing Title, message, and body.

But the icon used for the notification is always an empty white icon !

This is a sample of the notification schema:

What am I missing ?

{
    "data": {
        "Notification": "{\"Name\":\"Extra json to be parsed by react when clicking the notification\"}",
        "title": "You have a new message from X",
        "message": "You have a new message from X",
        "body": "You have a new message from X"
    }
}

I've used below package

"native-base": "^0.5.2",
"react": "16.0.0-alpha.3",
"react-native": "0.43.1",
"react-native-notifications": "^1.1.10",
"react-native-router-flux": "3.38.0",
"react-native-vector-icons": "^4.0.0"

enter image description here

index.android.js

componentDidMount = () => {
    this.handleConnectionChange;
    NotificationsAndroid.setNotificationOpenedListener((notification) => Actions.forums());
    NotificationsAndroid.setRegistrationTokenUpdateListener((deviceToken) => global.deviceID = deviceToken);
    NetInfo.isConnected.addEventListener('change', this.handleConnectionChange);
}
Arunkumar
  • 1,705
  • 1
  • 17
  • 25
  • post your current code ! – rushank shah Jul 26 '17 at 11:06
  • update the pushnotification recivedcode – Arunkumar Jul 26 '17 at 11:09
  • I don't know about react but in native development if ur project target sdk version >= lollipop, the notification icons will be black and white. https://stackoverflow.com/a/30795471/4070044 – shine_joseph Jul 26 '17 at 12:58
  • @rushankshah please check my sample code here: https://github.com/zo0r/react-native-push-notification/issues/489 I am facing the same issue. – kittu88 Jul 27 '17 at 09:58
  • Has you put icon parameter in your notification payload?.. you may refer FCM doc - https://firebase.google.com/docs/reference/admin/node/admin.messaging.NotificationMessagePayload#icon – zainoz.zaini Jan 12 '18 at 12:58

0 Answers0