Push notification 如何在MFP中的推送通知中发送促销图像
如下图所示,如何在推送通知中发送促销图像?我需要在有效负载中使用任何html代码吗?如果可能,请分享代码片段 编辑2019年4月: IBM MobileFirst 8.0支持发送富推送通知。更新至最新的服务器端和客户端补丁包以获取该功能。分派推送时,请使用以下有效负载结构: 推送有效载荷:Push notification 如何在MFP中的推送通知中发送促销图像,push-notification,apple-push-notifications,ibm-mobilefirst,worklight-server,worklight-runtime,Push Notification,Apple Push Notifications,Ibm Mobilefirst,Worklight Server,Worklight Runtime,如下图所示,如何在推送通知中发送促销图像?我需要在有效负载中使用任何html代码吗?如果可能,请分享代码片段 编辑2019年4月: IBM MobileFirst 8.0支持发送富推送通知。更新至最新的服务器端和客户端补丁包以获取该功能。分派推送时,请使用以下有效负载结构: 推送有效载荷: { "message":{ "alert":"Picture Notification for Android devices ", "url":"http://www
{
"message":{
"alert":"Picture Notification for Android devices ",
"url":"http://www.test.com"
},
"target":{
"deviceIds": ["MyDeviceId1", ...],
"platforms": ["A,G", ...],
"tagNames": ["Gold", ...],
"userIds": ["MyUserId", ...]
},
"settings":{
"gcm":{
"style":{
"notification_type":"PICTURE_NOTIFICATION",
"url":"<URL of the image that needs to be displayed>",
"title":"Test"
},
"apns": {
"attachmentUrl" : "http://test.com/test.png",
"badge" : 1,
"category" : 1,
"iosActionKey" : "Ok",
"launchImage" : "test.png",
"locArgs" : [ "["Shelly"]", ... ],
"locKey" : "REQ_FORMAT",
"payload" : {"custom":"data"},
"sound" : "song.mp3",
"subtitle" : "Sub Title",
"title" : "Title",
"titleLocArgs" : [ "["Shelly"]", ... ],
"titleLocKey" : "REQ_FORMAT",
"type" : "SILENT"
}
}
}
}
{
“电文”:{
“警报”:“Android设备的图片通知”,
“url”:”http://www.test.com"
},
“目标”:{
“设备ID”:[“MyDeviceId1”,…],
“平台”:[“A,G”,…],
“标记名”:[“黄金”,…],
“userid”:[“MyUserId”,…]
},
“设置”:{
“gcm”:{
“风格”:{
“通知类型”:“图片通知”,
“url”:“,
“标题”:“测试”
},
“apns”:{
“附件URL”:http://test.com/test.png",
"徽章":一,,
"类别":一,,
“iosActionKey”:“确定”,
“launchImage”:“test.png”,
“locArgs”:[“[“Shelly”],…],
“locKey”:“请求格式”,
“有效负载”:{“自定义”:“数据”},
“声音”:“song.mp3”,
“副标题”:“副标题”,
“头衔”:“头衔”,
“标题记录”:[“[“Shelly”],…],
“titleLocKey”:“请求格式”,
“类型”:“无提示”
}
}
}
}
我收到错误“错误请求-JSON验证在“gcm”失败”,JSON负载如下:-
{
"settings": {
"gcm": {
"payload": {
"action": "ACTION",
"path": "/path"
},
"style":{
"notification_type":"PICTURE_NOTIFICATION",
"url":"https://homepages.cae.wisc.edu/~ece533/images/airplane.png",
"title":"RICH PUSH"
}
},
"apns": {
"payload": {
"action": "ACTION",
"path": "/path"
}
}
},
"message": {
"alert": "Test MFP PUSH Notification."
},
"target": {
"userIds" : ["11359164"]
}
}
响应JSON:-
{
"code": "FPWSE0011E",`enter code here`
"message": "Bad Request - The JSON validation failed at 'gcm'."
}
我正在使用MFP8.0,请建议对上述JSON进行更改 你的答案让人困惑,兄弟,请详细说明。请检查这个答案