Quantcast
Viewing all articles
Browse latest Browse all 8068

Failed Receiving Sender ID Android cloudpush

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;

  1. Make a new app,
  2. Go to google developers console and make a project,
  3. copy the project number,
  4. go to credentials and and create a new server key ( left blank the text area and generate a key )
  5. go to my apps at appcelerator
  6. 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


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>