Docs: device/push token instructions in docs
redolent opened this issue · 2 comments
redolent commented
Hi y'all,
If anyone could be so generous as to update the documentation:
https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/API.md#pushsubscribetopic-successhandler-errorhandler
Please add a bit about how to obtain the push token id! Thank you so much!
redolent commented
Hmm... It seems that push.on('registration', ... );
is not being called, could be my fault. :(
The code I am using is:
var push = PushNotification.init({
ios:{
sound: true,
}
});
push.on('registration', function(data){
log("registration", JSON.stringify(_.toArray(arguments)));
});
push.on('notification', function(data){
log("notification", JSON.stringify(_.toArray(arguments)));
});
push.on('error', function(e){
log("error", JSON.stringify(_.toArray(arguments)));
});
push.subscribe('messages', function(){
log("subscribe success", JSON.stringify(_.toArray(arguments)));
}, function(){
log("subscribe error", JSON.stringify(_.toArray(arguments)));
});
redolent commented
Okay, I debugged the code, it's working fine. Would it be alright if I updated the documentation to include the word "token"?