目录

Message Cache Time for Offline Users

A user device cannot receive messages if it gets disconnected from the Internet. In this case, you can use the ttl field provided by the Push Kit server API for message cache on the server. If the user device gets connected to the Internet within the message cache time, the cached messages will be sent. Otherwise, the messages will be discarded.

Message body example:

{
    "validate_only": false,
    "message": {
        "notification": {
            "title": "message title ",
            "body": "message body"
        },
        "android": {
            "notification": {
                "click_action": {
                    "type": 2,
                    "url": "https://example.com"
                }
            },
            "ttl": "1000"
        },
        "token": [
            "pushtoken1"
        ]
    }
}