failed to register windows phone (PhoneGap Build) to PUSH service

Comments

8 comments

  • Avatar
    Roman Solomakha

    Hi,

    Have you tried to reproduce this issue on the sample app? You can download it from the link below:

    https://github.com/Pushwoosh/phonegap-3-sample-app

    Additionally, this issue could be related to the unstable internet connection. Please check whether that could be the case.

  • Avatar
    Tupai86

    Hi Andrew, thanks for your reply, i shall try this today and report back here!! :D

  • Avatar
    Tupai86

    Hi Guys, FYI very sorry i got real busy with work, i will definitely test this and post my findings here!!

  • Avatar
    Tupai86

    So! I have tested the "phonegap-3-sample-app" and the registration is working intermittently (1 success in 5 tries). Wonder what went wrong...

  • Avatar
    Tupai86

    UPDATE!

    After keep on playing around with the app, i realised, the app actually registered itself..

    funnily, the registerDevice() function will fire the fail function, then trigger the success function.

    So everytime i launch the app, it will say "failed to register", but then suddenly continue showing the device token, and suddenly the device is registered..

  • Avatar
    Roman Solomakha

    Hi,

    This is quite strange. Am I correct that you are using the latest PGB plugin? Have you checked whether this issue is not related to the unstable internet connection?

  • Avatar
    Tupai86

    Hi Andrew :)

    For version, i tried both: <gap:plugin name="pushwoosh-cordova-plugin" source="npm"/>

    and

    <gap:plugin name="com.pushwoosh.plugins.pushwoosh" version="3.4.2"/>

    Both are behaving the same.

  • Avatar
    Tupai86

    Just now i tried to tweak the registerDevice() like so:

    //register for pushes 
    pushNotification.registerDevice(
            function(status) {
                var pushToken = status;
                console.warn('token: ' + pushToken);
            },
            function(status) {
                console.warn(JSON.stringify(['failed to register ', status]));
            }
    );
    

    Guess what?? The fail function is no longer running.. On the console, i only get the "token: blah blah blah"

    the only thing i change on the registerDevice() is to change from using alert() to console.warn()

Please sign in to leave a comment.