gpt4 book ai didi

android - 当没有互联网连接时使用 FCM 发送推送通知

转载 作者:行者123 更新时间:2023-12-05 00:21:34 25 4
gpt4 key购买 nike

我使用 Firebase 云消息传递 (FCM) 向各种 Android 智能手机发送推送通知。当智能手机有互联网连接时,一切正常。但如果智能手机没有互联网连接,通知就会丢失。

我的问题是,有没有办法在智能手机恢复互联网连接时发送通知?

最佳答案

But if the smartphone not has internet connection, the notification is lost.

这不是真的。根据 collapse_key 设置,消息将被存储以便稍后在目标设备没有互联网连接时传送。

参见lifetime of a message文档。

If the device is not connected to FCM, the message is stored until a connection is established (again respecting the collapse key rules).

另请参阅collapsible and non collapsible messages并检查 collapse_key 设置选项。

关于android - 当没有互联网连接时使用 FCM 发送推送通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45635166/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com