To make your Chrome web pushes stay on screen until the user interacts with them, set the notification duration to the infinity symbol ∞ in the Send Push form.
Important! Internally this value is stored as 0. It does not mean "zero seconds" — it means the notification stays visible until the user clicks or dismisses it.
The same applies when sending via the API. In /createMessage the relevant Chrome parameter is:
- chrome_duration — optional, maximum 50 seconds. Changes how long the Chrome push is displayed. Set it to 0 to display the push until the user interacts with it.
{
"request": {
"application": "XXXXX-XXXXX",
"notifications": [
{
"send_date": "now",
"content": "Your message",
"chrome_duration": 0
}
]
}
}
Please note: whether a notification is actually kept on screen indefinitely is ultimately decided by the browser and the operating system. On some platforms (for example Chrome on macOS or Android, which hand notifications to the native OS notification center) the OS may still auto-dismiss or collapse the notification regardless of this setting.
Comments
0 comments
Please sign in to leave a comment.