我在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"
index.android.js
componentDidMount = () => {
this.handleConnectionChange;
NotificationsAndroid.setNotificationOpenedListener((notification) => Actions.forums());
NotificationsAndroid.setRegistrationTokenUpdateListener((deviceToken) => global.deviceID = deviceToken);
NetInfo.isConnected.addEventListener('change', this.handleConnectionChange);
}