Last active
October 10, 2017 09:59
-
-
Save rogerhu/8093311f8bdeeefc075ee12a5252a8a7 to your computer and use it in GitHub Desktop.
Push Testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See https://github.com/rogerhu/parse-server-push-marker-example/blob/master/cloud/main.js#L43-L66 | |
// for corresponding server code. | |
public class PushTest { | |
public static void sendPushTest() { | |
JSONObject payload = new JSONObject(); | |
try { | |
payload.put("sender", ParseInstallation.getCurrentInstallation().getInstallationId()); | |
} catch (JSONException e) { | |
e.printStackTrace(); | |
} | |
HashMap<String, String> data = new HashMap<>(); | |
data.put("customData", payload.toString()); | |
ParseCloud.callFunctionInBackground("pingReply", data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment