Hi,
I’m using Meteor 1.2.1 and phonegap-plugin-push@1.3.0 to push notifications. Sometime there are many of tokens is lost although the users are still logging in. Almost of them appear on android devices.
I suspect these below code. But when I test, it do not fire.
Push.appCollection = new Mongo.Collection('_raix_push_app_tokens');
Push.addListener('token', function(currentToken, value) {
if (value) {
// Update the token for app
Push.appCollection.update({ token: currentToken }, { $set: { token: value, updatedAt: new Date() } }, { multi: true });
} else if (value === null) {
// Remove the token for app
Push.appCollection.update({ token: currentToken }, { $set: { updatedAt: new Date() } }, { multi: true });
}
});
Has anyone encountered this error yet? And how to fix it?
Thank for reading my topic!