Send silent push notification with user-defined payload
kuma opened this issue · 4 comments
kuma commented
Is it possible to send silent push notification with user-defined payload such as:
{
aps: {
content-available: 1,
},
key: "value"
}
or
{
aps: {
alert: "",
content-available: 1,
}
key: "value"
}
Thanks,
cubicdaiya commented
Is it possible to send silent push notification with user-defined payload such as:
Now Gaurun does not accept the empty alert-body. But patches welcome.
On the other hand, it is already possible to include user-defined payload with the parameter such asextend
. For example,
{
"notifications" : [
{
...
"platform": 1,
"extend" : [
{ "key": "url", "val": "example.com" },
{ "key": "intent", "val": "SomeIntent" }
],
...
}
]
}
The payload like above is converted like below.
{
"aps": {
...
},
"url": "example.com",
"intent": "SomeIntent"
}
See gaurun/SPEC.md#post-push for the detail.
kuma commented
Thanks for the reply @cubicdaiya !
I knew that I can include user-defined payload with extend, but in order to send silent push notification, I need to omit alart
body.