【问题标题】:Promotional pushnotification with image in IBM mobile First 8.0IBM mobileFirst 8.0 中带有图像的促销推送通知
【发布时间】:2019-07-15 10:18:10
【问题描述】:

我们正在开发混合移动应用程序,(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",但图像未显示在通知消息中。我们期待通过图像通知我们在“设置”选项中传递的内容。 如果有人指导我们,我们错过了什么

【问题讨论】:

    标签: cordova push-notification ibm-mobilefirst cordova-plugins richpush


    【解决方案1】:

    用于发送通知的负载不正确。这是要发送的正确有效载荷结构,

        { 
          "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。 谢谢。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-18
      • 1970-01-01
      相关资源
      最近更新 更多