I've used phonegap-plugin-push plugin and its pretty easy and simple. For regID
in the code on deviceReady
event I've used.
var push = PushNotification.init({
"android": {
"senderID": "SENDER-ID"
},
"ios": {"alert": "true", "badge": "true", "sound": "true"},
"windows": {}
});
push.on('registration', function(data) {
console.log("registration event");
//here is your registration id
console.log(data.registrationId);
});
This is the link of the tutorial too
Hope it helps.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…