0
我正在尝试使用Pushwoosh插件pushwoosh-cordova-plugin
。 我按照给出的文档here推送推送通知
我想通过我的后端服务注册移动设备。即是利用/registerDevice
API
所以我的问题是:
1)我们需要下面的代码?它究竟做什么?
pushwoosh.onDeviceReady({
appid: "PUSHWOOSH_APP_ID",
projectid: "GOOGLE_PROJECT_NUMBER",
serviceName: "MPNS_SERVICE_NAME"
});
2)我们是否只有以下代码段并从我的通知提供商Pushwoosh接收移动推送通知?
document.addEventListener('push-notification', function(event) {
var notification = event.notification;
// handle push open here
});