var pushnotifications = require(' com.arellomobile.push'); Ti.API.info(" module is =>" + pushnotifications);
pushnotifications.pushNotificationsRegister("595043289423", "60666-9265D", {
//NOTE: all the functions fire on the background thread, do not use any UI or Alerts here
success:function(e)
{
Ti.API.info('TITAIUM!!! JS registration success event: ' + e.registrationId);
alert('TITAIUM!!! JS registration success event: ' + e.registrationId);
},
error:function(e)
{
Ti.API.error("TITAIUM!!! Error during registration: "+e.error);
alert("TITAIUM!!! Error during registration: "+e.error);
},
callback:function(e) // called when a push notification is received
{
alert("in callback");
Ti.API.info('TITAIUM!!! JS message event: ' + JSON.stringify(e.data));
//alert('notification data is=' +JSON.stringify("notification data="+e.data));
}
});