【发布时间】: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