How to add buttons in ionic FCM push notification

Viewed 160

I would like to send a push notification with 2 buttons as in the picture. enter image description here

I am receiving the notification, but it does not have the buttons. here is the code of the notification:

let notification = {
  "notification": {
    "title": title,
    "body": msg,
    "sound": "default",
    "click_action": "FCM_PLUGIN_ACTIVITY",
  }, 
  "actions": [
      {
        "title": "Subscribe",
        "action": "subscribe",
      },
      {
        "title": "Unsubscribe",
        "action": "unsubscribe"
      }
    ]
  ,
    "android":{
    "ttl":"2419200s"
  },
  "to":'/topics/'+topic,
  "priority": "high"
};

please how to solve this

0 Answers
Related