收到远程通知中没有图标/空白色图标

时间:2017-07-26 11:06:10

标签: android firebase react-native firebase-cloud-messaging react-native-android

我在Android上成功接收远程通知,显示标题,消息和正文。

但用于通知的图标始终是一个空的白色图标!

这是通知架构的示例:

我错过了什么?

{
    "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"
    }
}

我已经使用了以下包

"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);
}

0 个答案:

没有答案