Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When it reaches the push device, use the code below to capture the relevant payload.

Note

If you have added listeners in the token registration process, it will be sufficient to add only the 3rd line.

Code Block
languagejs
addEventListener('register', async (token) => {
}, (notificationPayload) => {
   console.log('notification payload', notificationPayload)
}, euroMessageApi, visilabsApi)

Payload

Code Block
languagejson
{
     "collapseKey": "com.example",
     "data": {
         "altUrl": "",
         "deepLink": "example://Home",
         "extraParam": "",
         "pushId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx",
         "pushType": "Image"
     },
     "from": "697196777607",
     "messageId": "0:1591265560144592%f61cc5d1f61cc5d1",
     "notification": {
         "android": {
             "clickAction": "http://example.com",
             "imageUrl": "http://example.com/logo.png",
             "sound": "default"
         },
         "body": "example",
         "title": "example"
     },
     "sentTime": 1591265560130,
     "ttl": 2419200
 }

 

Ui button
colorgreen
titleNext Step
urlhttps://relateddigital.atlassian.net/wiki/spaces/KB/pages/1093697566/React+Native-+Extra+Parameters