Pushwoosh / pushwoosh-appcelerator-titanium

Other
33 stars 16 forks source link

After clicking on push message receive function will be called twice #17

Closed maxkhrichtchatyi closed 7 years ago

maxkhrichtchatyi commented 8 years ago
function pushNotificationRegister() {
    ns.tools.pushnotifications.pushNotificationsRegister({
        'pw_appid' : ns.app.push_id,
        success : function(e)
        {
            setTimeout(function() {
                deviceTokenSuccess(e.registrationId);
            }, 0);
        },
        error : function(e)
        {
            setTimeout(function() {
                Ti.API.error('DEBUG LOG: PUSH / Error during registration');
            }, 0);
        },
        callback : function(e)
        {
            setTimeout(function() {
                // THIS FUNCTION WILL BE CALLED TWICE
                receivePush(e);
            }, 0);
        }
    });
};

[INFO] :   pause
[INFO] :   paused
[INFO] :   resume
[INFO] :   [PW-APPC] dispatch push: {
[INFO] :       aps =     {
[INFO] :           alert = "test";
[INFO] :           sound = default;
[INFO] :       };
[INFO] :       u = "{\"type\":\"event\"}";
[INFO] :   }
[INFO] :   [PW-APPC] dispatch push: {
[INFO] :       aps =     {
[INFO] :           alert = "test";
[INFO] :           sound = default;
[INFO] :       };
[INFO] :       u = "{\"type\":\"event\"}";
[INFO] :   }
[INFO] :   [PW] [I] -[PWRequestManager] 
maxkhrichtchatyi commented 8 years ago

What about this issue? P.S. When could we see compiled module version with last commits?

shaders commented 8 years ago

compiled!