更新时间:2023-09-08 22:31:52
FCM notification messages
不支持largeIcon或bigPicture.
FCM notification messages
don't support the largeIcon or bigPicture.
如果您在后台需要它们,则可以使用FCM data message
.
if you need them while in background you can use a FCM data message
.
对于数据消息,总是调用onMessageReceived(message)
方法,因此您可以使用message.getData()
方法并创建自定义通知.
For data messages the onMessageReceived(message)
method is always called, so you can use the message.getData()
method and create your custom notification.
在此处阅读有关通知消息和数据消息的更多信息: https://firebase.google.com/docs/cloud-messaging/concept-options#notifications_and_data_messages
Read more about notification messages vs data messages here: https://firebase.google.com/docs/cloud-messaging/concept-options#notifications_and_data_messages