我正在搜索Android应用程序中的推送通知。我检查了"Pushwoosh":在initPushwoosh方法中,我看到了GOOGLE_PROJECT_ID和PUSHWOOSH_APP_ID。
function initPushwoosh() {
var pushNotification = window.plugins.pushNotification;
pushNotification.registerDevice(
{
projectid: "GOOGLE_PROJECT_ID",
appid : "PUSHWOOSH_APP_ID"
},
function(status) {
var pushToken = status;
console.warn('push token: ' + pushToken);
},
function(status) {
console.warn(JSON.stringify(['failed to register ', status]));
}
);
document.addEventListener('push-notification', function(event) {
var title = event.notification.title;
var userData = event.notification.userdata;
if(typeof(userData) != "undefined") {
console.warn('user data: ' + JSON.stringify(userData));
}
navigator.notification.alert(title);
});
}我怎么才能拿到这两个身份证?或者有什么更好的方法来做这件事?
我在PhoneGap文档中看到了通知,它是推送通知吗?
谢谢。
发布于 2012-11-17 23:24:15
Phonegap的通知与推送通知无关。在这里查看:notification.md.html#Notification
要将Pushwoosh与Phonegap集成起来,请查看手册:http://www.pushwoosh.com/programming-push-notification/android-gcm-push-notifications-guide/
在本页中有更多关于使用Pushwoosh的指南:
http://www.pushwoosh.com/programming-push-notification/
祝你好运!
发布于 2012-11-18 11:29:33
以下是您必须执行的步骤:
GOOGLE_PROJECT_ID。通常如下所示:本例中的https://code.google.com/apis/console/#project:12345678912:access是: 12345678912My Apps菜单中创建或输入PUSHWOOSH_APP_IDhttps://stackoverflow.com/questions/13428272
复制相似问题