编辑2019年4月:
IBM MobileFirst 8.0支持发送丰富的推送通知。更新到最新的服务器和客户端修订包以获取该功能。分派Push时使用以下有效内容结构:
推送负载:
{
"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"
}
}
}
}