Is it at all possible?
Yes, generally we have all the required instruments to do that, including:
- a way to target individual users by their User ID;
- the Message Inbox to store messages on the device.
However, there are certain limitations that should be taken into consideration.
1) You'll need your own backend, because:
- sending messages directly from a user's device is not secure;
- push delivery depends on a good internet connection, so relying entirely on push notifications for chat requires a fast, reliable setup.
2) There is a limit to the push payload size, which shortens the allowed text length and the amount of extra content you can attach.
Apple (APNs) allows a maximum payload of 4 KB (4096 bytes) for regular remote notifications and 5 KB (5120 bytes) for VoIP notifications; Firebase Cloud Messaging also allows up to 4 KB. Once other technical data in the payload is accounted for, the visible text is fairly short.
To work around this, have the application download the actual content from your backend when the push arrives.
3) Also note that while all the major players on the market (WhatsApp etc.) do use push notifications, they use them to notify users about new messages rather than to carry the chat content itself.
Comments
0 comments
Please sign in to leave a comment.