push notification - getDeviceToken of android without cloudpush -
i integrating push notification on android.
according appcelerator article.
// notification setting var devicetoken = null; // require module var cloudpush = require('ti.cloudpush'); // initialize module cloudpush.retrievedevicetoken({ success: devicetokensuccess, error: devicetokenerror }); // enable push notifications device // save device token subsequent api calls function devicetokensuccess(e) { ti.api.info("devicetokensuccess :" + e.devicetoken); devicetoken = e.devicetoken; } function devicetokenerror(e) { alert('failed register push notifications! ' + e.error); } // process incoming push notifications cloudpush.addeventlistener('callback', function (evt) { alert("notification received: " + evt.payload); }); i need devicetoken push notification android, script uses cloudpush, requires 'titanium arrow service' login.
however want use amazon sns service push message instead of 'arrow service' , want not use arrow service.
(i finished amazon sns setting , successful in push notification in ios.)
how can android devicetoken without using cloudpush.
is possible??
you can use https://github.com/morinel/gcmpush device token
Comments
Post a Comment