Appcelerator钛Android推送通知GCM失败? [英] Appcelerator titanium Android push notification GCM failure?

查看:207
本文介绍了Appcelerator钛Android推送通知GCM失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Appcelerator工作室的新项目中为Android和IOS设置了推送通知,IOS工作正常,但是android并不是,我的问题是android设备令牌已成功获取并注册,但是当我从Appcelerator工作室IOS在Android失败时成功。




以及创建的API键:


,并且我在Appcelerator ASC中使用了API密钥:



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

$ b $我发现解决方案文件的appcelerator没有更新



所以在这里你有什么



请注意, gist.github.com/MotiurRahman/68bb7aad307901805b5frel =nofollow> https://gist.github.com/MotiurRahman/68bb7aad307901805b5f 然后配置
$ b

推送适用于Android设备的服务:

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

使用Firebase WEB API KEY
和项目ID



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



获取项目编号(作为发件人ID)从您的Firebase控制台中的JSON文件和Web API KEY(作为GCM API密钥)。现在,将您的仪表板配置为推送通知



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


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.

I've enabled this API's in google developer console .

and created API key :

and i used the API key in Appcelerator ASC :

i don't understand why i can take the Android device token but i am not able to send push notification ?

解决方案

i found the solution the document of appcelerator is not updated yet

so here what you have to do

try the following sample code for devices registration :

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

Then Configuring push services for Android devices :

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

With Firebase WEB API KEY and project ID

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

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

这篇关于Appcelerator钛Android推送通知GCM失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆