cordova 推送插件服务器端 php
cordova push plugin server side php
规格
phonegap-plugin-push 1.8.1 "PushPlugin" 在 cordova 应用程序中
问题
我似乎无法弄清楚服务器端 JSON 发送到 GCM 以便我可以在 phone 上获得大图通知。
目前只显示消息和标题
postData = "{ \"registration_ids\": [ \"" + RegKeyIDs + "\" ], \"data\": {\"additionalData\":\"" +
"additionalData" + "\", \"title\":\"" + "title" + "\", \"message\": \"" + "message" + "\", \"image\": \"" +
"https://google.com/randomimage.jpg" + "\", \"subtitle\":\"" + "subtitle" + "\", \"tickerText\": \"" +
"1" + "\", \"smallIcon\": \"" +
"https://google.com/randomimage.jpg" + "\", \"largeIcon\": \"" +
"https://google.com/randomimage.jpg" + "\", \"bigpicture\": \"" +
"http://www.jqueryscript.net/images/Simplest-Responsive-jQuery-Image-Lightbox-Plugin-simple-lightbox.jpg" + "\"}}";
是否有任何关于服务器端 GCM 处理大图片通知的文档
看起来您需要将 style
字段设置为 picture
并将 image
字段设置为图像的位置 http://path_to_image
。
规格
phonegap-plugin-push 1.8.1 "PushPlugin" 在 cordova 应用程序中
问题
我似乎无法弄清楚服务器端 JSON 发送到 GCM 以便我可以在 phone 上获得大图通知。
目前只显示消息和标题
postData = "{ \"registration_ids\": [ \"" + RegKeyIDs + "\" ], \"data\": {\"additionalData\":\"" +
"additionalData" + "\", \"title\":\"" + "title" + "\", \"message\": \"" + "message" + "\", \"image\": \"" +
"https://google.com/randomimage.jpg" + "\", \"subtitle\":\"" + "subtitle" + "\", \"tickerText\": \"" +
"1" + "\", \"smallIcon\": \"" +
"https://google.com/randomimage.jpg" + "\", \"largeIcon\": \"" +
"https://google.com/randomimage.jpg" + "\", \"bigpicture\": \"" +
"http://www.jqueryscript.net/images/Simplest-Responsive-jQuery-Image-Lightbox-Plugin-simple-lightbox.jpg" + "\"}}";
是否有任何关于服务器端 GCM 处理大图片通知的文档
看起来您需要将 style
字段设置为 picture
并将 image
字段设置为图像的位置 http://path_to_image
。