- Made sure the
phonegap.js
script is in your.html
file. - Replace {your_sender_id} with your GCM sender id
- Include the
push.js
script, and this script's dependencies are included in your app. - Add
phonegap
as a module dependency to your app.
push.registerPush(function (result) {
if (result.type === 'registration') {
console.log("PUSh Registrazione device_id:"+result.id+" Device:"+result.device);
}else{
console.log("PUSH errore");
}
});
MIT