Android-Titanium-Sample项目不会激活pushwoosh回调函数

时间:2014-07-09 13:25:49

标签: titanium-alloy pushwoosh

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));


    }
});

0 个答案:

没有答案