简体   繁体   English

在Android中使用Urban Airship无法获得推送通知

[英]Couldn't get the push notification using urban Airship in android

I have created an application in Google console, and get the GCM server API key. 我已经在Google控制台中创建了一个应用程序,并获取了GCM服务器API密钥。 I have followed this link of Urban Airship to configure the App for Pushnotification. 我已按照Urban Airship的此链接配置了用于Pushnotification的应用程序。 https://docs.urbanairship.com/pages/viewpage.action?pageId=1509252 https://docs.urbanairship.com/pages/viewpage.action?pageId=1509252

I have requested the Urban Airship and got the access to use GCM in my app, and created the Application in Urban Airship. 我已经申请了城市飞艇,并可以在我的应用中使用GCM,并在城市飞艇中创建了该应用。 I downloaded the sample application from Urban Airship and changed the package name to, which I have given in the Urban Airship application. 我从Urban Airship下载了示例应用程序,并将包名称更改为Urban Airship应用程序中指定的包名称。 I run that application in my Toshiba tab, having Android 4.0.3 OS. 我在具有Android 4.0.3 OS的Toshiba选项卡中运行该应用程序。 I got the AppId from the sample code. 我从示例代码中获得了AppId。 When I tried to send a test push from Urban Airship application, I didn't get the notification. 当我尝试从Urban Airship应用程序发送测试推送时,我没有收到通知。 Even didn't get any error. 即使没有任何错误。 I implemented this for iphone also, inserted the certificate. 我也为iPhone实现了此功能,并插入了证书。 I got pushes for iphone. 我得到了iPhone的推动。 I can see the device token in the app in Urban Airship. 我可以在Urban Airship的应用程序中看到设备令牌。 But I see in the AppId column, says like "You don't have any registered AppId". 但是我在AppId列中看到这样的信息,例如“您没有任何注册的AppId”。 what I have done wrong? 我做错了什么?

There are some things that would be helpful in looking at the matter. 有些事情有助于您解决问题。 First, do you have logcat output showing successful registration to Urban Airship, with a 200 response? 首先,您是否有logcat输出显示成功注册了Urban Airship,并得到200响应?

Also, sometimes the web console can take a bit of time to refresh itself after API registration, if your APID is still not showing as registered in the web console, I would suggest emailing support@urbanairship.com , they can look at your app key and better assist you from there. 此外,有时在API注册后,Web控制台可能需要一些时间来刷新自身,如果您的APID仍未显示为在Web控制台中注册的状态,我建议您发送电子邮件至support@urbanairship.com ,他们可以查看您的应用密钥并从那里更好地为您提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM