The push notification is coming empty

Comments

2 comments

  • Avatar
    Dmitry Dyudeev

    Hello Tom,

    Empty push title and content is actually a well known issue, and its source is the wrong Android SDK choice in the Control Panel. Please double check whether you have specified the correct SDK in the Control Panel (Your app page -> Configure -> Edit application -> Android SDK).

  • Avatar
    vivekkumar96

    Hi Tom and Dmitry,

    I am getting header but no message and all.

    my code says this.

    function initPushwooshAndroid() {

    var pushNotification = window.plugins.pushNotification;
    // Set push notification callback before we initialize the plugin. This is called when a push is received.
    document.addEventListener('push-notification', function (event) {
        var title = event.notification.title;
        var userData = event.notification.userdata;
        var msg = event.notification.message;
    
        if (typeof (userData) != "undefined")
        {
            alert('user data: ' + JSON.stringify(userData));
        }
    
            alert(msg);
    });
    
    // This will trigger all pending push notifications on start.
    pushNotification.onDeviceReady({ projectid: GOOGLE_PROJECT_ID, appid: PUSHWOOSH_APPID });
    Deviceregister();
    

    } Please help me?

    Thanks, Vivek.

Please sign in to leave a comment.