I am searching for push notification in Android applications. I checked "Pushwoosh": in the initPushwoosh
method I saw GOOGLE_PROJECT_ID
and 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);
});
}
How can I get these two IDs? Or is there any better way to do this?
i saw Notification in PhoneGap documentation, Is it push notification?
Thank you.