我正在尝试通过弹出的expo项目实现react-native-push-notification。
带有有效负载的本地通知,例如:
PushNotification.localNotification({
id: '123',
ticker: "My Notification Ticker",
largeIcon: "ic_launcher",
smallIcon: "ic_notification",
bigText: "My big text that will be shown when notification is expanded",
subText: "This is a subText",
title: "My Notification Title",
message: "My Notification Message"
});
正常工作,大图标和小图标均正确显示。
但是,使用这样的远程FCM:
{
"to": "c23XFueEix0:APA91bFeZwGw5GnrGLdA5A56X9pRC6ag4_362rh7YbODv3ff-CKw3PZO6fr2HSEk3qUaMTwPMjBk6KLnqe_LuX0HHjIMC-0HT6mCu-_-udUhXAn-RViwMp00S_bMt4PBtAv38VnFmAL4",
"notification": {
"title": "Notification Heading Ready",
"body": "Short Message Ready",
"largeIcon": "ic_launcher",
"smallIcon": "ic_notification"
}
}
仅显示标题和正文,而不显示图标。我们如何发送图标?