parse-platform - 解析 - 安装表未设置 deviceToken 或 pushType

标签 parse-platform push-notification google-cloud-messaging devicetoken

我有一个在 Parse 上运行的应用程序,通知工作正常。我更改了应用程序打包并在 Parse 上创建了一个新应用程序。

使用新应用程序时,表 _Installation 上的 deviceToken 和 pushType 列始终为空,因此即使从 Parse 网页发送推送也不起作用,并且在启动应用程序时会生成一个新条目。

我已经更新了我的 java 代码和云代码上的解析键。

有人知道我可能遗漏了什么或者可能会发生什么,因此相同的代码在具有等效配置的不同应用程序中具有不同的行为?

如果我使用 pushType="gcm"和“deviceToken”更新我在另一个应用程序中的安装之一,则该设备会收到通知。

谢谢

最佳答案

好的,我遇到了类似的问题。这两列都是空的。
这主要是由于 list 问题。
您的权限似乎没问题,因为您收到通知并且还能够在解析数据库中注册。

所以问题应该在<receiver>标签应该只有 2 个像我一样。

<receiver android:name="com.parse.ParseBroadcastReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.USER_PRESENT" />
            </intent-filter>
        </receiver>
         <receiver android:name="com.parse.GcmBroadcastReceiver"
            android:permission="com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

                <!--
                  IMPORTANT: If you change the package name of this sample app,
                  change "com.parse.tutorials.pushnotifications" in the lines
                  below to match the new package name.
                -->
                <category android:name="com.example.ifis" />
            </intent-filter>
        </receiver>

如果你有像“com.google.android.gcm.GCMBroadcastReceiver”这样的接收器,请删除,还有一个 <service android:name="com.parse.PushService" />

关于parse-platform - 解析 - 安装表未设置 deviceToken 或 pushType,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27508587/

相关文章:

ios - 解析 Swift : User relations with a "friends request"

ios - 从 Parse (ios) 中的指针行获取数据

java - 如何自动刷新Listview?

android-studio - 没有 key [permission#$ {applicationId} .permission.C2D_MESSAGE]的记录

android - 仅在应用程序端将 Google Cloud Messaging 更新为最新的 gms.gcm.GoogleCloudMessaging 是否可以?

ios - 混合两个 PFQuery 结果

parse-platform - 从 iOS8 Today Widget 访问 PFUser currentUser

android - 使用 angularjs 和 cordova 推送通知插件恢复时路由更改的问题

Meteor raix 推送通知因无连接而丢失

java - 安卓 GCM InstanceId.getToken() -> java.io.IOException : TIMEOUT