[英]Promotional pushnotification with image in IBM mobile First 8.0
我们正在开发混合移动应用程序(IBM Mobilefirst8.0,IONIC3.0,Angular4.0),我们正试图发送促销推送通知(带有图像的推送通知),我们能够发送带有文本的推送通知,但无法获取图像,
我们在下面尝试了什么:
{
"message":{
"alert":"Picture Notification from MFP console ",
"url":"http://www.sfshjdf.com"
},
"priority" : "high"
"target":{
"userIds": ["MyUserId", ...]
},
"settings":{
"gcm":{
"style":{
"notification_type":"PICTURE_NOTIFICATION",
"url":"https://theidealmobile.com/wp-content/uploads/2018/09/42720897530_f34f7247cc_b.jpg",
"title":"Test Picture Notification"
},
"apns": {
"attachmentUrl" : "https://theidealmobile.com/wp-content/uploads/2018/09/42720897530_f34f7247cc_b.jpg",
"payload" : {
"title": "test Sampele",
"url": "https://www.gsdfh.com"
}
}
}
}
}
我们得到的是:
我们收到文本消息"Picture Notification from MFP console"
但该图像未显示在通知消息中。 我们希望通过图片通知我们在“设置”选项中传递的内容。 如果有人指导我们,我们会错过什么
用于发送通知的有效负载不正确。 这是要发送的正确有效负载结构,
{
"message":{
"alert":"Picture Notification from MFP console ",
"url":"http://www.sfshjdf.com"
},
"target": {
"userIds": ["MyUserId", ...]
},
"settings":{
"gcm":{
"style":{
"notification_type":"PICTURE_NOTIFICATION",
"url":"https://theidealmobile.com/wp-content/uploads/2018/09/42720897530_f34f7247cc_b.jpg",
"title":"Test Picture Notification"
},
},
"apns": {
"attachmentUrl" : "https://theidealmobile.com/wp-content/uploads/2018/09/42720897530_f34f7247cc_b.jpg",
"payload" : {
"title": "test Sampele",
"url": "https://www.gsdfh.com"
}
}
}
}
请尝试以上有效负载JSON。 谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.