简体   繁体   中英

How to send notification using fcm larger than 4kb

We are developing messaging app in ios, android and web platforms. We want to send a large chat message(text) from the server to clients(Web, android, ios). But data messages can have a 4KB maximum payload when sending push notification using FCM as mentioned here .

An immediate workaround would be to divide a large message into chunks of 4KB and send all those notification. Any better suggestion other than this solution would be appreciated.

您可以分离消息并分配和制作自己的消息,其中包含有关多少个零件和该零件号的信息,然后为整个消息分配一个ID,通过FCM发送它们,在客户端中,您可以收集收到的消息,直到所有零件到达,然后结合所有主题以获得最终信息,我正在使用此解决方案。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM