简体   繁体   中英

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.

在此处输入图片说明

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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