简体   繁体   English

通过GCM和Urban Airship的Android推送通知

[英]Android push notification via GCM and Urban Airship

I have implemented and app starting from google gcm client example. 我已经实现了从Google gcm客户示例开始的应用程序。 I get an regId, that seem alright, after that when I try to send a push with Urban Airship I put my regId in the APID field, but it appear an error: invalid APID. 我收到一个regId,看起来还不错,之后,当我尝试向Urban Airship发送推送消息时,我将regId放在APID字段中,但出现了一个错误:无效的APID。

Maybe should I use the urban airship example in android to get the apid? 也许我应该使用android中的城市飞艇示例来获取蚜虫?

i think that APID and regID its the same thing. 我认为APID和regID是同一件事。 Am I right? 我对吗?

   PushManager.shared().setIntentReceiver(PushNotificationPluginIntentReceiver.class);
            String apid = PushManager.shared().getAPID();
            log.info("My Application onCreate - App APID: " + apid);
        }

Using this piece of code get the client app id and It will be used for Test push 使用这段代码获取客户端应用程序ID,并将其用于测试推送

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

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