【问题标题】:pushwoosh push notification for ionic does not work with android离子的 pushwoosh 推送通知不适用于 android
【发布时间】:2016-08-12 12:48:04
【问题描述】:

我无法让 Android Push 与 ionic 一起使用。 (顺便说一下ios也可以)

我按照这里的文档:

http://docs.pushwoosh.com/docs/cordova-phonegap

我什至尝试基于此创建相同的示例应用程序:

https://www.youtube.com/watch?v=-P2O1jmb7fI

而且它在 Android 上不工作(虽然 ios 工作)。

我配置了 PushWoosh 和应用程序,如下所示:

Application code: XXXXX-XXXXX (formatted hex appcode id)
google server key: 123456789012345678901234567890123456789 (39 hex key)
google project number: 123456789012 (mine has 12 digits)
GCM API is enabled 

我可以在 PushWoosh 中看到注册了 Android 设备,但是为什么 我不能收到推送吗?有什么我需要在电话上做的, 代码等?我什至尝试将断点放入 addEventListener 但没有收到任何内容。

确实需要 Android 才能使用推送通知。谢谢!

我正在使用设备:

Redmi Note 2
Android version 5.0.2 LRX22G

也不适用于模拟器:

Android 5.0.2
Build number: sdk_google_phone_x86-eng 5.0.2 LSY66D 1797986test-keys

PushWoosh 响应(当我为这些重新创建新密钥时会更新):

As far as I can see in your Push History, there are some "Unauthorized" errors. There are three possible scenarios why you are getting the "Unauthorized" error:

The Google Project number in your application isn't the one in Google Console;
The API key in your Control Panel isn't the same that you got in Google Console;
The API key, for some reason, doesn't work properly.
Could you please check whether your Google Project number and API key are fine?

Also, could you please try using the Browser Key instead of the Server Key and vice versa?

【问题讨论】:

    标签: android ionic-framework push-notification pushwoosh


    【解决方案1】:

    这是此类错误的正确答案。请确保您的 Google 项目 ID 与服务器密钥匹配。还要确保您没有在服务器密钥上设置任何限制或白侦听。

    查看这篇文章,了解如何查找 Google 项目 ID:
    https://support.google.com/cloud/answer/6158840?hl=en

    【讨论】:

      【解决方案2】:

      问题是我没有在正确的项目中启用 GCM。一直假设启用的主要项目 api 对所有人都有效。

      【讨论】:

        猜你喜欢
        • 2018-04-03
        • 1970-01-01
        • 2017-04-15
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多