Last active
August 29, 2015 14:06
-
-
Save CHLibrarian/f5aab36ce20d86828099 to your computer and use it in GitHub Desktop.
ContextHub Context Rule Push Gist
This file contains hidden or 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
| // Sending simple notification to all devices with the 'active' tag | |
| push.deliver( JSON.stringify({tags: ["active"], alert: "Hello World."})); | |
| // Sending a silent background notification | |
| var data = { "commuter": "group_location_refresh" }; | |
| var devices = [ "5048A9B5-2089-4AD6-AAE4-25E7837385AC", "2e074d0b18b7b190" ] | |
| var payload = { "device_ids" : devices, "priority" : 10, "sound" : "", "content_available" : 1, "data" : data }; | |
| push.deliver(JSON.stringify(payload)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment