[英]Sending push notifications to Android devices using Parse
I find the parse documentation is little confusing when it comes to Android. 我发现对于Android而言,解析文档一点也不令人困惑。 I am sending notifications using Parse from a .NET background service.
我正在使用.NET后台服务中的Parse发送通知。 The service is calling Parse REST API
该服务正在调用Parse REST API
deviceToken
and deviceType
deviceToken
和deviceType
安装设备 This works beautifully with iOS device POST: 1/push
这与iOS设备POST的效果很好:
1/push
{
"deviceToken": "<big device token>",
"deviceType": "android",
"channels" : []
}
This says 这说
{
code: 114
error: "deviceToken may not be set for deviceType android"
}
the documentation says, we need to have a unique installationId
for Android device install uploads. 该文档说,对于Android设备安装上传,我们需要具有唯一的
installationId
。 How do I do this from backend? 我如何从后端做到这一点? Which API should be used to get installation Id?
应该使用哪个API来获取安装ID?
This is how you get the installation ID : 这是获取安装ID的方法:
ParseInstallation.getCurrentInstallation().getInstallationId()
( Class Reference ) ( 班级参考 )
What I understand, Parse doesn't support android device installations using REST API; 据我了解,Parse不支持使用REST API的android设备安装; it supports from client side SDK.
它从客户端SDK支持。
https://www.parse.com/questions/android-device-installation-via-rest https://www.parse.com/questions/android-device-installation-via-rest
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.