Parse for Push(1)Documents Reading

本文介绍如何使用Parse服务发送推送通知,包括获取设备令牌并发送到Parse服务器的方法,同时提供了使用cURL命令进行安装和更新的具体步骤。此外还讨论了Parse在推送通知方面的优势,如无需处理APNS和GCM客户端、支持消息调度及发送延迟等功能。
Parse for Push(1)Documents Reading

REST API document for Sending Push
https://www.parse.com/docs/rest/guide

https://www.parse.com/docs/rest/guide#push-notifications

JS Guide Sending Message
https://www.parse.com/docs/js/guide#push-notifications

I like this client API to get the device token
https://github.com/raix/push

https://atmospherejs.com/raix/push

And this API for the server side
https://github.com/pjay/plush

It seems to me some overlap between Parse and Meteor. We do not have to use Parse for push notification.

We can also use Parse for schedule and push notification. We can use cordova to get the device token and then send it to Parse.com
curl -X POST \
-H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"deviceType": "ios",
"deviceToken": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdad",
"channels": [
""
]
}' \
https://api.parse.com/1/installations

We can directly send push notification through Parse.com based on the objectId.
curl -X PUT \
-H "X-Parse-Application-Id: oEI3DHtrBBgNosZyyVXjMIe6yNlNyYj5xY4g5X7z" \
-H "X-Parse-REST-API-Key: 56eRw1D0RZG3GHuRbV3t2KWdsKkFKy2mkM6E9KkP" \
-H "Content-Type: application/json" \
-d '{
"user": {
"__type": "Pointer",
"className": "_User",
"objectId": "vmRZXZ1Dvo"
}
}' \
https://api.parse.com/1/installations/mrmBZvsErB

For parse, we have the benefit:
1 Do not need to deal with javaAPNS, GCM java client
2 We have schedule, delay sending message
3 We have the analytics for the Messages we send out

References:
https://www.parse.com/?
http://blog.youkuaiyun.com/lixiaodaoaaa/article/details/8694570
http://www.cnblogs.com/over140/archive/2013/06/12/3132496.html
http://hgx615.iteye.com/blog/1853858
http://www.iteye.com/topic/1129477
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值