I am trying to send push notifications to segment users in Android. Below is the code, it worked for few trials but now the same code send the push to everyone instead of the intended receiver (at the least that is what is shown on the dashboard). Anything I am doing wrong here?
ParseQuery pushQuery = ParseInstallation.getQuery();
pushQuery.whereEqualTo("user", ParseObject.createWithoutData("_User", mObject.get(position)));//receiver
ParsePush push = new ParsePush();
push.setQuery(pushQuery);
push.setMessage(alias +" followed you");
push.sendInBackground();
mObject.get(position) is where I get the objectId of the receiver in the installation class from and 'user' is a pointer to the _User class. Thanks