ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-push

Cordova|Android: actionName not passed to the notification handler

Closed this issue · 5 comments

I had configured the categories and the action buttons are showing up properly in the notification message. But the when action is clicked, notification handler doesnot give the actionName/IdentifierName for the action button that is clicked.

@k02pradeep Are you using Android or iOS platform ?

Cordova app built for Android platform

@k02pradeep Please use the latest version of plugin 3.2.3

To check the clicked action identifier, use the following code,

var showNotification = function(notif) {
    var identifierName = notif["identifierName"];
    alert(identifierName);
};
BMSPush. registerNotificationsCallback(showNotification);

I am receiving only messageId and status in the notif object in the showNotification method.
When checked the code changes you made, IdentiferName in available in the registerNotificationsCallback handler rather than setNotificationStatusListener
It is working with the latest version for the registerNotificationsCallback. Please update the documentation part

@k02pradeep My mistake 🤒 ... Thanks for pointing that out ....