我正在尝试使用Ionic 自定义推送通知和phonegap-plugin-push来实现通知操作。
不幸的是,即使消息和标题完美地工作,我仍然没有运气显示操作按钮。
这是我的cURL请求:
curl -X POST -H "Authorization: Bearer XXXXXXXXXXXXXXX" -H "Content-Type: application/json" -d '{
"tokens": ["XXXXXXXXXXXXXXX"],
"profile": "push01",
"notification": {
"message": "test",
"android": {
"title": "test android",
"data": {
"actions": [
{ "icon": "emailGuests", "title": "EMAIL GUESTS", "callback": "app.emailGuests", "foreground": true},
{ "icon": "snooze", "title": "SNOOZE", "callback": "app.snooze", "foreground": false }
]
}
}
}
}' "https://api.ionic.io/push/notifications"
任何想法我可能做错了什么吗?
谢谢!