gpt4 book ai didi

android - Pushwoosh推送通知

转载 作者:行者123 更新时间:2023-12-01 22:28:41 25 4
gpt4 key购买 nike

我正在尝试使用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
});

最佳答案

是的,您需要此代码来注册您的应用程序并接收来自pushwoosh服务的通知。您可以获取所有这些详细信息1.从pushwoosh帐户获取2.从Google api控制台获取projectid

pushwoosh.onDeviceReady({
appid: "7BCF0-9F***",
projectid: "102568298****",
serviceName: "APPNAME"
});

关于android - Pushwoosh推送通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40903665/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com