根据文档:http://parseplatform.org/docs/android/guide/#setting-up-push
// Save the current Installation to Parse.
ParseInstallation.getCurrentInstallation().saveInBackground();上面的代码行在登录时执行。然后在parse仪表板上的"Installation“类下出现新条目。但是device-token在解析仪表板上显示为“未定义”。
在这种情况下,每次登录时在解析仪表板上创建新条目,但所有条目都缺少设备令牌。
我已经按照文档进行了GCM推送设置。请给我建议。
发布于 2017-03-21 16:48:30
实际上,我把错误的应用程序包放在AndroidManifest.xml文件的权限标签中是错误的
现在app在权限标签中添加了正确的包名后,正在生成token。应用程序包名是: com.app.myapp,下面是现在的工作代码:
<!--
IMPORTANT: Change "com.parse.starter.permission.C2D_MESSAGE" in the lines below
to match your app's package name + ".permission.C2D_MESSAGE".
-->
<permission
android:name="com.app.myapp.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.app.myapp.permission.C2D_MESSAGE" />https://stackoverflow.com/questions/42858220
复制相似问题