简体   繁体   English

Appcelerator钛Android推送通知GCM失败?

[英]Appcelerator titanium Android push notification GCM failure?

i've setup push notification for Android and IOS in new project in Appcelerator studio , the IOS working fine , but the android not , my issue is the android devices token is successfully taken and registered but when i send a push from Appcelerator studio IOS success when Android failed. 我已经在Appcelerator Studio的新项目中为Android和IOS设置了推送通知,IOS正常运行,但是android不能,我的问题是android设备令牌已成功获取并注册,但是当我从Appcelerator studio IOS发送推送成功时当Android失败时。

在此处输入图片说明

I've enabled this API's in google developer console . 我已经在Google Developer Console中启用了此API。

在此处输入图片说明

and created API key : 并创建API密钥:

在此处输入图片说明

and i used the API key in Appcelerator ASC : 我在Appcelerator ASC中使用了API密钥:

在此处输入图片说明

i don't understand why i can take the Android device token but i am not able to send push notification ? 我不明白为什么我可以使用Android设备令牌,但无法发送推送通知?

i found the solution the document of appcelerator is not updated yet 我发现解决方法appcelerator的文件尚未更新

so here what you have to do 所以这是你要做的

try the following sample code for devices registration : 尝试使用以下示例代码进行设备注册:

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

Then Configuring push services for Android devices : 然后为Android设备配置推送服务:

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

With Firebase WEB API KEY and project ID 带有Firebase WEB API KEY和项目ID

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

Get project_number (as Sender ID ) from JSON file and Web API KEY( as GCM API key ) from your firebase console.Now configure your dashboard for push notification 从Firebase控制台中获取JSON文件中的project_number(作为发件人ID)和Web API KEY(作为GCM API密钥)。现在配置您的仪表板以进行推送通知

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

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

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