Start a new topic

Gcm not pushing the devices via collectoin hooks

The Same code is working previously and my app is blocked due to the payment..

once am paid the payment then onwards the collection hooks are not working .. am putting the below my collection hook code

```function onPostSave(request, response, modules){

var push = modules.push,collectionAccess = modules.collectionAccess;

var result1=null,result2=null,callback,callback1;

var len;

// finally working code

collectionAccess.collection('droppointalerts').find({"routeid":request.body.routeid,"routename":request.body.routename,"droppointname":request.body.droppointname,"checked":"true"}, function (err, userColl) {

if (err) {

return response.error(err);

} else {

result1=userColl;

len=result1.length;

callback1();

}

});

callback1=function(){

for(var i=0; i
collectionAccess.collection('user').find({"username":result1[i].username}, function (err, userColl) {

if (err) {

return response.error(err);

} else {

push.send(userColl, "dpalert:Bus reached "+request.body.droppointname+"

stop,"+request.body.routename);

// response.body={success:userColl};

//result2=userColl;

response.body = {things: result1, stuff: len};

return response.complete(200);

}

});

}

};

}```

Hey androidsvtech, I just wanted to let you know we saw your question, apologies for the delay due to our forum migration.
When was the app locked down? Could it be that there are functions no longer supported that you're calling?
previously app was lock down i made payments 01-04-2014 .....
We've noticed a bunch of problems with people using GCM. We're investigating now to see if something about the API has changed.
See this thread also: https://support.kinvey.com/discussion/comment/201904427#Comment_201904427
Login or Signup to post a comment