im workin on phonegap v5.3.6 and cordova v5.3.3. I did everything on README but plugin is not working.
Here is my code below;
onDeviceReady: function() {
var push = PushNotification.init({
"android": {
"senderID": "MY_SENDER_ID"
},
"ios": {},
"windows": {}
});
push.on('registration', function(data) {
console.log("registration event");
document.getElementById("regId").innerHTML = data.registrationId;
console.log(JSON.stringify(data));
});
push.on('notification', function(data) {
console.log("notification event");
console.log(JSON.stringify(data));
var cards = document.getElementById("cards");
var push = '<div class="row">' +
'<div class="col s12 m6">' +
' <div class="card darken-1">' +
' <div class="card-content black-text">' +
' <span class="card-title black-text">' + data.title + '</span>' +
' <p>' + data.message + '</p>' +
' </div>' +
' </div>' +
' </div>' +
'</div>';
cards.innerHTML += push;
});
push.on('error', function(e) {
console.log("push error");
});
}
It's not throwing any success or error message. What is wrong on this code phrase?
Here is git repo of plugin : https://github.com/phonegap/phonegap-plugin-push
Thank you for your help