Checking status of GCM message

倖福魔咒の 提交于 2020-01-10 10:17:19

问题


I'm trying to send a message to my phone by using GCM. I receive a message id=0... response but my phone doesn't show any message. Is there a way to check the status of messages(sent,waiting etc.)


回答1:


Nope. If you received message_id=xxxx response, then GCM server has accepted your request and will process it ASAP. Whatever happens after that you have no control over with. You won't get another response whether the messages are delivered to the intended devices.




回答2:


Google has recently added support to view the status of your messages sent via GCM. Follow these steps:

GCM statistics

You can sign up for GCM for both Play and non-Play apps. However, GCM statisticss will be available for only published Google Play apps. To see GCM statistics on your Google Play Developer Console, here's how to associate the GCM Simple API Key or C2DM token with your application:

  1. Sign in to your Google Play Developer Console.
  2. Select an app.
  3. On the left menu, click Services & APIs.
  4. Click the Link a sender ID button.
  5. Type your GCM API key or C2DM client login token.
  6. Click Link.
  7. Once your app is published, you can view GCM statistics on your app's Statistics page.

Sign in to your Google Play Developer Console.

  1. Select an app.
  2. On the left menu, click GCM Diagnostics.



来源:https://stackoverflow.com/questions/11952309/checking-status-of-gcm-message

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!