hello,
I have read everything about the cloud push but i couldn't make it work. I am using 3.3.0GA and cloud is enabled in my app. I have added cloud push module too.
What i have done;
- Make a new app,
- Go to google developers console and make a project,
- copy the project number,
- go to credentials and and create a new server key ( left blank the text area and generate a key )
- go to my apps at appcelerator
paste the api key and copied number to both development and production section at android
still not getting any device token and it fails,
here is the app.js file for cloudpush
var cloudPush = require('ti.cloudpush'); cloudPush.debug = true; cloudPush.enabled = true; cloudPush.showTrayNotification = false; cloudPush.retrieveDeviceToken({ success : function(e) { Ti.API.debug("retrieveDeviceToken SUCESS: " + JSON.stringify(e)); cloudPush.enabled = true; }, error : function(e) { Ti.API.debug("retrieveDeviceToken ERROR: " + JSON.stringify(e)); } }); cloudPush.addEventListener('callback', function(e) { Ti.API.debug("Push received: " + JSON.stringify(e)); //Ti.API.debug("Push received: ") });how can i subscribe the device for push ?
thanks