Pushwoosh 3.4.1 Phonegapbuild (3.6.3) - problem with android

Comments

1 comment

  • Avatar
    Max Konev

    Hi,

    Please check the guide:
    https://www.pushwoosh.com/programming-push-notification/android/android-additional-platforms/phonegapcordova-sdk-integration/

    Note that registerDevice now takes callback parameters only and configuration parameters has been moved to onDevice Ready

    //initialize Pushwoosh with projectid: "GOOGLE_PROJECT_NUMBER", appid : "PUSHWOOSH_APP_ID". This will trigger all pending push notifications on start.
    pushNotification.onDeviceReady({ projectid: "GOOGLE_PROJECT_NUMBER", appid : "PUSHWOOSH_APP_ID" });
    
    //register for pushes
    pushNotification.registerDevice(
        function(status) {
            var pushToken = status;
            console.warn('push token: ' + pushToken);
        },
        function(status) {
            console.warn(JSON.stringify(['failed to register ', status]));
        }
    );
    

Please sign in to leave a comment.