web-push-libs / webpush-java

Web Push library for Java
MIT License
318 stars 112 forks source link

How can I mofidy the payload with title, icon and content ? #83

Closed EpsilonTal closed 5 years ago

EpsilonTal commented 5 years ago

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?

EpsilonTal commented 5 years ago

Can be closed, succeeded... I delivered the Json as String.