2016-10-13 156 views
1

我已经为Android和iOS在Appcelerator的工作室新的项目设置推送通知,在IOS工作正常,但Android的不是,我的问题是,Android设备令牌被成功取出并登记,但是当我从送Appcelerator的工作室推Android失败时IOS成功。Appcelerator钛Android推送通知GCM失败?

enter image description here

我已经启用在谷歌开发者控制台这个API的。

enter image description here

和创建的API键:

enter image description here

,我使用的Appcelerator ASC API密钥:

enter image description here

我不明白为什么我可以采取Android设备令牌,但我无法发送推送通知?

回答

2

我找到了解决办法的Appcelerator的文件还没有更新

所以在这里你必须做

尝试器械注册下面的示例代码是什么:

https://gist.github.com/MotiurRahman/68bb7aad307901805b5f

然后Android设备的配置推送服务:

http://docs.appcelerator.com/platform/latest/#!/guide/Configuring_push_services-section-37551713_Configuringpushservices-ConfiguringpushservicesforAndroiddevices

随着火力地堡WEB API KEY 和项目ID

https://console.firebase.google.com/?pli=1

从你的火力console.Now配置JSON文件和Web API KEY(如GCM API密钥)获取PROJECT_NUMBER(如发件人ID)您用于推送通知的仪表板

http://docs.appcelerator.com/platform/latest/#!/guide/Sending_and_Scheduling_Push_Notifications

+0

我们现在使用什么值? Appcelerator ACS现在要求服务器密钥和发件人ID。我不断收到“失败”错误。看到这里,我的问题:http://stackoverflow.com/questions/43743333/appcelerator-titanium-cannot-send-push-notification-to-android –

+0

我也有一个非常类似的问题在这里:http://stackoverflow.com/问题/ 43757524/Appcelerator的钛 - 让 - Android的凭据到推通知 –