如何在MFP中的推送通知中发送促销图像

问题描述 投票:0回答:1

如何在推送通知中发送促销图像,如下图所示?我是否需要在有效负载中使用任何html代码?如果可能,请分享代码段。

like this

push-notification apple-push-notifications ibm-mobilefirst worklight-server worklight-runtime
1个回答
0
投票

编辑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"
        }
      }
   }
}
© www.soinside.com 2019 - 2024. All rights reserved.