Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Push cihaza ulaştığında ilgili payload’u yakalamak için alttaki kodu kullanın.

Token kaydetme işleminde listener eklediyseniz sadece 3. satırı eklemeniz yeterli olacaktır.

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

Örnek kullanımı bu sayfadaki 41. satırda inceleyebilirsiniz.

Payload

{
     "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
 }

Sonraki Adıma Geç

  • No labels