Firebase 的 RemoteMessage 对象不包含消息 ID 或发送时间
Firebase's RemoteMessage object contains no message ID or sent time
我正在通过 API(不是 Firebase 控制台)在 Android 上测试 Firebase 的消息传递功能,但是 getMessageId()
returns null
和 getSentTime()
returns 0
。不过,我可以正常获取其他字段。这是 Firebase 中的错误还是什么?
目前正在使用 9.2.0 版的 firebase 依赖项。
我通过 API 发送的是:
{
"to":"frL...",
"data":{"title":"Hi",
"body":"such body"
}
}
我在 data
字段中发送 notification
字段,因为我想手动处理通知,如果我使用 notification
字段,我无法做到这一点。
原来是9.4版本修复的bug。更多信息在这里 https://firebase.google.com/support/release-notes/android#9.4
RemoteMessage#getMessageId() now returns the correct message-id for received messages. Previously, it returned null.
我正在通过 API(不是 Firebase 控制台)在 Android 上测试 Firebase 的消息传递功能,但是 getMessageId()
returns null
和 getSentTime()
returns 0
。不过,我可以正常获取其他字段。这是 Firebase 中的错误还是什么?
目前正在使用 9.2.0 版的 firebase 依赖项。
我通过 API 发送的是:
{
"to":"frL...",
"data":{"title":"Hi",
"body":"such body"
}
}
我在 data
字段中发送 notification
字段,因为我想手动处理通知,如果我使用 notification
字段,我无法做到这一点。
原来是9.4版本修复的bug。更多信息在这里 https://firebase.google.com/support/release-notes/android#9.4
RemoteMessage#getMessageId() now returns the correct message-id for received messages. Previously, it returned null.