How to avoid delay in Android GCM messages / change heartbeat

后端 未结 5 1984
长发绾君心
长发绾君心 2020-11-28 21:14

I\'ve been reading many posts regarding a GCM issue that affects some people. It seems that in some devices/routers/carriers the notifications suffer delays. I\'ve experienc

5条回答
  •  粉色の甜心
    2020-11-28 22:14

    There's no need to send the heartbeat from the GCM server to the phone, you can force android itself to send the heartbeat sooner that it would otherwise do.

    I had a look at the Push Notifications Fixer app, which I tested and worked for me, and it seems all you need to do is broadcast the following intents:

    com.google.android.intent.action.MCS_HEARTBEAT
    com.google.android.intent.action.GTALK_HEARTBEAT
    

    I'm not sure why it's sending both, you can try only one and see if it does the trick. Here's the link to the app (I'm not the developer): https://play.google.com/store/apps/details?id=com.andqlimax.pushfixer.noroot

提交回复
热议问题