The payload for this java lib is defined as String.
When using webpush with NodeJS I had the option to modify the "payload" like that:
const payload = { actions: actions, icon: iconUrl, title: title, message: message, url: actionUrl };
And the ServiceWorker recognize it as:
event.data.json().title
How can I communicate the payload, on Java like I do with NodeJS?
Hello,
The payload for this java lib is defined as String.
When using webpush with NodeJS I had the option to modify the "payload" like that:
const payload = { actions: actions, icon: iconUrl, title: title, message: message, url: actionUrl };
And the ServiceWorker recognize it as:
event.data.json().title
How can I communicate the payload, on Java like I do with NodeJS?