Software Archive
Read-only legacy content
17061 Discussions

pushwoosh problem on Android (and maybe iOS?)

Alessandro_S_
Beginner
218 Views

Hello, I've this problem: I wrote code as example says to do:

this is my piece of code, very simple:

function initPushwoosh()

{
    var uidx=GetToken();   
    var pushNotification =window.plugins.pushNotification;
    document.addEventListener('push-notification', function(event) {... some code here} );
    pushNotification.onDeviceReady({ projectid: <PUSH_ID>, pw_appid :<PUSH_APP> });
    pushNotification.registerDevice(
        function(status) {
            var pushToken = status;
            pushNotification.setTags({'userid':uidx}); 
            pushstate=1;
            if (!IsIOs())
              pushNotification.setMultiNotificationMode();
        },
        function(status) {
        }
    );
  }
 
initPushwoosh is called in app ready and works great in 99% of situation, in fact, everything works well if the app is not Closed by OS.
 
If system closes the app (for saving memory options or something like that), ok, my app is not a service so I won't be able to get notifications while it's "closed". But I expect (as documentation of "RegisterDevice" states) that as I open my App every "pending" push would be received. But I'm not able to get pending pushes sent when the app was closed, and I'm able to get only new pushes. I wrote to pushwoosh that built the plugin with intel (I think), but they say that it should work, so I wonder if I'm doing something wrong in my XDK project! please help me
0 Kudos
1 Reply
PaulF_IntelCorp
Employee
218 Views

We are not experts with third-party plugins. The XDK creates standard Cordova (aka PhoneGap) apps. You might try searching StackOverflow for help with that plugin when used in a Cordova or PhoneGap app. For example, search for "stackoverflow pooshwoosh cordova phonegap notifications" or something like that.

0 Kudos
Reply