Start a new topic

How to send push notification to specific users not all the users?


I am working on a android application and i want to send push notification to some selected users from database using Business logic on postSave.

I do not want to send push notifications to all the users.

How can i implement this??

1 person has this question

I am unable to send push notification ... i have only one user in user collection .. i managed My users creating my custom user collection named "LoginMaster". please open the above link i posted and study all the code and answer me. 

hi damien,

plz answer me this question..

No worries, please let me know if you need anything else.

Thanx Damien Bell


You could do something like the code below


function onPostSave(request, response, modules) {
 var push = modules.push;
 var collectionAccess = modules.collectionAccess;
collectionAccess.collection('user').find({'username': 'bc18fbae-708b-416e-a47e-ae96f7d1ecfe'}, function (err, user) {

   push.sendMessage(user, 'hello3a');

 There may be a stray ) or } in there, but that is roughly right.


Login or Signup to post a comment