InvalidRegistration无论在C2DM&安培; GCM [英] InvalidRegistration both on C2DM & GCM

查看:352
本文介绍了InvalidRegistration无论在C2DM&安培; GCM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过C2DM / GCM发送推送通知通过PHP一个Android应用程序。
无论我用,我不断收到以下内容:

I'm trying to send Push Notifications via C2DM / GCM to an Android Application via PHP. No matter which i use, i keep getting the following :

有关GCM:
{\"multicast_id\":7672049265453358197,\"success\":0,\"failure\":1,\"canonical_ids\":0,\"results\":[{\"error\":\"InvalidRegistration\"}]}

For GCM : {"multicast_id":7672049265453358197,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]}

有关C2DM:错误= InvalidRegistration

For C2DM : Error=InvalidRegistration

整天念叨这个问题后,配发我仍然一无所知,为什么这是一个InvalidRegistration,如果我走registatoin_id,并用它来发送通过城市飞艇测试推送消息它的工作原理。

After reading allot about this issue all day I'm still clueless as to why this is an InvalidRegistration as if i take the registatoin_id and use it to send a test push message via Urban Airship it works.


  • 请注意,这不是一个auth问题,因为我得到了[HTTP_ code] => 200从谷歌回来,而不是401。

  • 如果我发送一个空registatoin_id,甚至从它省略只是一个字符错误信息更改为MissingRegistration。

任何帮助将是AP preciated。

Any help would be appreciated.

推荐答案

如果您复制 APID 从UrbanAirship那么这就是问题所在:

If you copied the apid from UrbanAirship then that's the problem:

http://docs.urbanairship.com/reference/glossary.html#长期-APID

飞艇推标识符

APID

APIDs识别与瞬态注册ID,如Windows设备的设备。
  这些标识符是版本4的UUID,并且是36个字符,包括破折号。

APIDs identify devices with transient registration IDs, such as Windows devices. These identifiers are version 4 UUIDs, and are 36 characters long, including dashes.

您需要从 HTTP设备信息://docs.urbanairship.com/api/ua.html#get--api-apids-(APID)gcm_registration_id属性。这是注册ID需要的。

You need to get the device information from http://docs.urbanairship.com/api/ua.html#get--api-apids-(APID) in the "gcm_registration_id" property. That's the registration id needed.

看来你需要再保持跟踪的注册ID,因为它是由暂时性的UrbanAirship建议。但是,这是另一个话题。

It seems you need to then keep track of that registration id as it is transient as suggested by UrbanAirship. But that's another topic.

这篇关于InvalidRegistration无论在C2DM&安培; GCM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆