【发布时间】:2017-04-15 16:18:19
【问题描述】:
我正在尝试使用 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
});
【问题讨论】:
标签: android ios cordova push-notification