我使用推送机器人在我的应用程序中进行通知。我在用科尔多瓦。
我查看了api,他们要求iphone的平台编号为0,android的平台编号为1。为什么我需要给他们这个平台?在站点中,他们是平台的令牌列表,所以他们已经知道平台了。
我可以给他们一些android和iphone的其他价值吗?或者发送两次,一次是0,一次是1?
发布于 2016-03-09 04:58:28
根据文档中的以下页面:https://pushbots.com/developer/docs/api-batch_push -您可以将多个平台编号作为一个数组提供:
iOS的
0。
1用于Android。
2用于Chrome
例如0,1推送到Android和iOS。
在后面的curl示例中,您可以看到平台是一个数组:
curl -X POST \
-H "x-pushbots-appid: 54cc0a511d0ab13c0528b459d" \
-H "x-pushbots-secret: 1444fe8be3324ff7128f25aa18cdee12" \
-H "Content-Type: application/json" \
-d '{ "platform" : Array , "tags" : Array , "sound" : String , "badge" : String , "schedule" : String , "except_tags" : Array , "alias" : String , "except_alias" : String , "payload" : JSON , }' \
https://api.pushbots.com/push/allhttps://stackoverflow.com/questions/33249317
复制相似问题