WordPress WP-GCM plugin does not sending new post notification

In WordPress – WP-GCM plugin does not sending any push notification when publishing a new post or updating a previous one. It sending only message. Anyone please provide solution for this..

Related posts

Leave a Reply

1 comment

  1. This is because the app is configured only to receive “message” and send a notification. The tag for when publishing a new post is “new_post” and for updating a previous one is “update” (Ref: WordPress GCM documentation). You have to configure the app to receive notifications for this.

    Currently it will look something like this in android:

    newms = extras.getString("message").toString();
    sendNotification(newms);
    

    You have to add something like:

    newms = extras.getString("new_post").toString();
    newms = extras.getString("update").toString();
    sendNotification(newms);