Parse.com push-notification
-
A push-notification mechanism should be developed for the annex(s).
The backend "Parse" was used to develop the application. Two people participate in one game. After one player's answer, another has been notified that you were answered (or wanted to play with you).
Please indicate how this can be realized and where to look, other than official Parse documentation. Thank you.
-
You don't need to know anything about the socket and the other, low-level stuff, all of which do the Parse libraries.
All you need to know is the identifier of the device where you're sending. The receiver may, in principle, communicate this through the facility.
ParseInstallation
ParseInstallation installation = ParseInstallation.getCurrentInstallation(); installation.put("device_id", deviceToken); //номер устройства который дается при регистрации installation.saveInBackground();
Whoever sends can filter this identifier:
ParseQuery query = ParseInstallation.getQuery(); query.whereEqualTo("device_id", deviceToken); ParsePush push = new ParsePush(); push.setQuery(query); push.sendPushInBackground();
The filter may be placed on the identifier of the sewer or the canal name.
Next, the host side should be up.
BroadcastReceiver
which will receive notification of the receiver, as appropriate, to process it with a notification or popup box, in general for your discretion.I don't want to say google, but really google. Come in. https://github.com/ - there's a lot of different origins/examples.