I Want to send a message to devices that registered to my app in parse, in registration i have added a column national_id
and now i want to send a message to specific national_id
what i tried:
JSONObject obj;
try {
obj = new JSONObject();
obj.put("alert", "test");
obj.put("action", "com.parse.pushnotifications.UPDATE_STATUS");
obj.put("someData", "some additional data ");
ParsePush push = new ParsePush();
ParseQuery query = ParseInstallation.getQuery();
query.whereEqualTo("national_id", nationalID);
push.setQuery(query);
push.setData(obj);
push.sendInBackground();
} catch (JSONException e) {
e.printStackTrace();
}
but desired device does not get any message
what is the problem? how can i solve it?