【问题标题】:Android push notification Urban AirShip error : invalid authorization on platform GCMAndroid推送通知Urban AirShip错误:平台GCM上的授权无效
【发布时间】:2013-12-06 16:27:31
【问题描述】:

我正在使用 Urban Airship,我的推送在 iOS 上运行良好,但在 Android 上出现错误。

在城市飞艇网站的错误控制台中,我有以下消息:

Received push with invalid authorization on platform GCM

我的设备正确显示在 APID 部分中,并且我验证了此地址中的所有步骤:https://support.urbanairship.com/customer/portal/articles/823114-gcm-troubleshooting-guide

此代码正确显示 APID:

PushManager.shared().getAPID()

我的属性似乎不错,我验证了:

gcmSender = 123456789122
transport = gcm
developmentAppKey = APP KEY taken on the urban airship site
developmentAppSecret = APP KEY Secret taken on the urban airship site
inProduction = false

我还在城市飞艇站点验证了我的 GCM,从 cloud.google.com 放入了正确的 Api 密钥和包。

有什么我忘记了吗?

【问题讨论】:

    标签: android push-notification urbanairship.com


    【解决方案1】:

    您需要在此处检查的几件事

    1. 您是否使用 Google Projects 生成了密钥?
    2. 应用启动后,您是否会收到来自 Urban airship 的唯一注册 ID

    主要是第 2 点是问题 还要检查是否为键添加引号,如果是,则添加不带引号的键

    【讨论】:

    • 感谢您的回答,首先我在任何地方都没有报价,我知道没有必要。我应该报价吗? 1. 我的密钥是由谷歌项目生成的,是的。 2.有代码可以测试吗?我只在我的设备上测试了 PushManager.shared().getAPID(),它可以工作
    • 如果您获得了 getAPID() 的价值,那么您身边的一切都很好。我能看到的唯一问题是您的服务器与 Urban airship 和 Google 服务器之间的通信。查看这篇文章support.urbanairship.com/customer/portal/articles/…。如果您已经这样做了,那么您可以联系 UA 帮助台,他们会迅速回复
    • 是的,我已经尝试过了...是否有可能我在生成密钥部分时犯了错误?我如何确定这不是该部分的错误?
    • 您可以再次生成密钥。如果您在 iOS 和 Android 上使用相同的项目,那么您很可能会混合密钥
    【解决方案2】:

    希望下面的链接对你有所帮助。

    http://tuohuang.info/urbanairship-android-received-push-with-invalid-authorization-on-platform-gcm/#.U7KMrUCri41

    注意:我们应该选择服务器密钥。如果我们选择任何其他推送通知,我们将陷入此错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-02
      • 1970-01-01
      • 1970-01-01
      • 2013-07-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多