Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
## XX.XX.XX
## NEXT RELEASE

* Added web push notification support. Give the SDK the new `push` consent and call `enable_push_notifications` once from a user gesture, passing the VAPID public key from your application settings; from then on it keeps the subscription token in sync and records notification clicks on its own. `disable_push_notifications` is remembered across page loads, so the automatic registration never undoes it; only another explicit `enable_push_notifications` subscribes again. Sites that already run a service worker import `countly_sw.js` into it (see `examples/example_custom_sw.js`) and pass their registration as `push_service_worker_registration`; the imported handlers only act on Countly's own pushes and notifications, and `self.COUNTLY_PUSH_LIFECYCLE = false` keeps the host worker's install/activate behaviour.
* Added `push_notification_listener` (also `set_push_notification_listener`) to be told when a notification is received, clicked (which button, its title and URL) or closed, together with the message's custom payload. "closed" is best effort and differs by browser and OS; Safari and desktop Firefox show no action buttons, and both can report "closed" right after "clicked".
* A notification click only opens http(s) URLs; any other scheme is refused and logged, while the click is still recorded.
* A click while no page of the site is open (a closed browser, or a button that leads to another site) is now recorded by the service worker itself, using the server details the page hands it; when that is not possible the click waits for the next page, in IndexedDB rather than in worker memory, so it survives the browser stopping the worker. The next page still gets the "clicked" listener callback for it.
* `enable_push_notifications` gives up with reason "timeout" when the browser never finishes creating the subscription (seen on iOS 18.7), so a later call can retry instead of joining the stuck one; `push_subscribe_timeout` (milliseconds, default 30000) sets the wait. The silent registration at load now logs its outcome.
* With `debug: true` the service worker logs every push, click and close too, and forwards the lines to the page as `[SW]` entries. A host worker turns this on with `self.COUNTLY_PUSH_DEBUG = true`.
* Added support for server initiated connection tests. When the server asks for one, the SDK probes the endpoints it depends on and reports which of them are reachable.

## 26.1.3

Expand Down
Loading
Loading