我使用cordova fcm插件显示推送通知。我需要带有whatsapp和facebook推送通知之类的按钮的推送通知。有什么方法可以在fcm推送通知中添加按钮吗?如果没有,我该怎么办?
答案 0 :(得分:0)
好像您可以使用FCM一样。该概念是在有效载荷的actions
部分内设置data
:
结构如下:
{
"registration_ids": ["my device id"],
"data": {
"title": "AUX Scrum",
"message": "Scrum: Daily touchbase @ 10am Please be on time so we can cover everything on the agenda.",
"actions": [
{
"icon": "emailGuests",
"title": "EMAIL GUESTS",
"callback": "emailGuests",
"foreground": true
},
{
"icon": "snooze",
"title": "SNOOZE",
"callback": "snooze",
"foreground": false
}
]
}
}
您已经为FCM推送通知发送了什么代码?您正在使用哪个库?