我正在向所有设备发送推送通知,并且为此我创建了基于标记的推送通知的适配器,如下所示。从PHP脚本调用适配器
function sendTagNotification(applicationId, notificationText, notificationTags) {
var notificationOptions = {};
notificationOptions.message = {};
notificationOptions.target = {};
var tags = notificationTags.split(",");
notificationOptions.message.alert = notificationText;
notificationOptions.target.tagNames = tags;
WL.Server.sendMessage(applicationId, notificationOptions);
return {
result : "Notification sent to users subscribed to the tag(s): '" + notificationTags + "'."
};
}
现在我们想的办法是,我们将具有PHP脚本,将信息内容发送到工作灯适配器和sendTagNotification
适配器将收到的邮件内容,并将其发送给所有移动用户。
那么有什么办法从PHP脚本调用适配器?
我们的客户端使用'v 6.3',所以我想我必须选择第二个选项,我了解url部分访问适配器,但我怎么可以传递参数 – Hunt
我得到'java.lang.RuntimeException:java.io.FileNotFoundException:找不到文件:/ adapters/WLPush/sendTagNotification' 我的终点是' http://192.168.100.32:10080/RR_MobileApp/adapters/WLPush/sendTagNotification' – Hunt
其实如果你使用6.3那个URL结构将不起作用。它假定REST也是7.0和更高版本的一部分......嗯。我会尽快回复你... –