Appcelerator titanium Android push notification GC

2019-02-11 07:42发布

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.

enter image description here

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

enter image description here

and created API key :

enter image description here

and i used the API key in Appcelerator ASC :

enter image description here

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

1条回答
乱世女痞
2楼-- · 2019-02-11 08:20

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

查看更多
登录 后发表回答