I'm programming an Android App about share different content. Now I develop the social network, and when one user add new friend, send a Parse Push notification that the user add you.
I use Parse SDK, and I don't now how to do this.
I try this:
ParseInstallation installation = ParseInstallation.getCurrentInstallation();
installation.put("userId",id);
try {
installation.save();
This create a userId column in Installation class of Parse Data. (I see Parse Data and the userId column is the correct id from user)
Next I do:
//Create our Installation query
ParseQuery<ParseInstallation> pushQuery = ParseInstallation.getQuery();
pushQuery.whereEqualTo("userId",ParseUser.getCurrentUser().getObjectId());
// Send push notification to query
ParsePush push = new ParsePush();
push.setQuery(pushQuery); // Set our Installation query
push.setMessage("Willie Hayes injured by own pop fly.");
push.sendInBackground();
I create a query that compare the userId colum (that contains the userId from user that add you) with the current ParseUser, but the Push don't send, and nobody receive.
Please help me.
Thanks.