[英]How to send notification using fcm larger than 4kb
We are developing messaging app in ios, android and web platforms. 我们正在iOS,Android和Web平台上开发消息传递应用程序。 We want to send a large chat message(text) from the server to clients(Web, android, ios).
我们想从服务器向客户端(Web,android,ios)发送大型聊天消息(文本)。 But data messages can have a 4KB maximum payload when sending push notification using FCM as mentioned here .
但发送使用FCM提到推送通知时,数据电文可以有一个4KB的最大有效载荷在这里 。
An immediate workaround would be to divide a large message into chunks of 4KB and send all those notification. 一个直接的解决方法是将一个大消息分成4KB的块并发送所有这些通知。 Any better suggestion other than this solution would be appreciated.
除此解决方案外,还有其他更好的建议。
您可以分离消息并分配和制作自己的消息,其中包含有关多少个零件和该零件号的信息,然后为整个消息分配一个ID,通过FCM发送它们,在客户端中,您可以收集收到的消息,直到所有零件到达,然后结合所有主题以获得最终信息,我正在使用此解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.