summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/etc/push.js
diff options
context:
space:
mode:
authorRene Ae <aehtyb@gmail.com>2015-12-11 03:05:10 -0600
committerRene Ae <aehtyb@gmail.com>2015-12-11 03:05:10 -0600
commitb1775dd32d1e0113eba81cfdb9a5626295eebc4e (patch)
tree19a2f4ea004d11037e494e863a39ac834d364429 /StoneIsland/www/js/lib/etc/push.js
parent3442b2821d30dd1ca6c6db1ba089ae3f5c95a758 (diff)
parent053473394e6e0990c68a924adbb7c7d75f35973d (diff)
Merge branch 'android' of https://github.com/okfocus/stone-island into android
Diffstat (limited to 'StoneIsland/www/js/lib/etc/push.js')
-rwxr-xr-xStoneIsland/www/js/lib/etc/push.js25
1 files changed, 24 insertions, 1 deletions
diff --git a/StoneIsland/www/js/lib/etc/push.js b/StoneIsland/www/js/lib/etc/push.js
index ab0c0141..0db5c1a2 100755
--- a/StoneIsland/www/js/lib/etc/push.js
+++ b/StoneIsland/www/js/lib/etc/push.js
@@ -1 +1,24 @@
-// \ No newline at end of file
+var push = (function(){
+ var appId
+ var clientKey
+ var push = {}
+ push.init = function(){
+ parsePlugin.initialize(appId, clientKey, push.subscribe, push.error)
+ }
+ push.subscribe = function() {
+ parsePlugin.subscribe('SampleChannel', push.did_subscribe, push.error)
+ }
+ push.did_subscribe = function(){
+ // parsePlugin.getInstallationId(function(id) {
+ // var install_data = {
+ // installation_id: id,
+ // channels: ['SampleChannel']
+ // }
+ // }, push.error)
+ }
+ push.error = function(e){
+ console.log("push error")
+ }
+
+ return push
+})() \ No newline at end of file