FCM是否有一个缺点,如果设备处于脱机状态,并且从FCM触发了消息,则该消息在联机时不会在设备上接收到吗? [英] Does FCM has a disadvantage that, if a device is offline, and message is triggered from FCM, the message is not received on device on coming online?

查看:38
本文介绍了FCM是否有一个缺点,如果设备处于脱机状态,并且从FCM触发了消息,则该消息在联机时不会在设备上接收到吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很久以前,我在Android应用中使用了GCM.它有一个缺点.从GCM向我的Android应用触发了一条消息时,如果该设备未连接到互联网,则该应用未收到该消息.上线时也没有收到该消息.是FCM有同样的缺点?

Long time ago, I used GCM in my Android app. It had a disadvantage. When a message was triggered from GCM to my Android app, if the device was not connected to internet, the message was not received by app.On coming online also the message was not received.Does FCM have the same disadvantage?

推荐答案

如果设备未连接到FCM,则消息将一直存储到建立连接为止(再次遵守折叠键规则).建立连接后,FCM会将所有未决消息传递到设备.如果设备再也无法连接(例如,如果它已恢复出厂设置),则该消息最终将超时并从FCM存储器中丢弃.除非设置了time_to_live标志,否则默认超时为四周.

If the device is not connected to FCM, the message is stored until a connection is established (again respecting the collapse key rules). When a connection is established, FCM delivers all pending messages to the device. If the device never gets connected again (for instance, if it was factory reset), the message eventually times out and is discarded from FCM storage. The default timeout is four weeks, unless the time_to_live flag is set.

https://firebase.google.com/docs/cloud-messaging/概念选项

这篇关于FCM是否有一个缺点,如果设备处于脱机状态,并且从FCM触发了消息,则该消息在联机时不会在设备上接收到吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆