Some devices does not receive GCM push eventhough all messages succeed from server

感情迁移 提交于 2019-12-06 03:28:06

Unfortunately from my experience there will always be a number of users(but a really small percentage) that wont receive GCM.

One of the reasons that it didnt work on one of the phones we used was that its Google Play Services app wasnt installed correctly(and its essential for GCM).

And the biggest issue was that we couldnt re-install the Google Play Services through normal means(like a regular users) the google play store said it was already installed, but it was missing from the phone(got erased last year when google installed this on all phones without user notice, some bug occured on that particular phone->Prestigio PAPADUO)....another side effect of this was that no apps with Google maps inside could load maps->except the google maps app...

It could be just the phones themselves since it is working on many others like you said.

The category in your broadcast receiver is wrong :

<receiver
    android:name="com.innocreate.app.gcm.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" />
        <category android:name="com.app.muf_appen" />
    </intent-filter>
</receiver>

It should be the package name of your app,com.innocreate.app, instead of com.app.muf_appen. This usually causes problems only in older Android versions.

In my case, it was because the Google account linked to the device was misconfigured (password had changed).

Once the login and password had been correctly set, my application was working well.

To be sure it works :

  • reset your Google Account on your Android device
  • reboot it
  • reinstall your application to get another registration ID from GCM
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!