Versions Compared

Key

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

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

Note

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

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

Info

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

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
titleSonraki Adıma Geç
urlhttps://relateddigital.atlassian.net/wiki/spaces/RMCKBT/pages/1087602690/React+Native-+Ekstra+Parametreler