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

Cordova Push notifications Plugin for IBM Cloud Mobile Services
Apache License 2.0
9 stars 9 forks source link

Cordova|Android: actionName not passed to the notification handler #81

Closed k02pradeep closed 6 years ago

k02pradeep commented 6 years ago

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.

AnanthaKrish commented 6 years ago

@k02pradeep Are you using Android or iOS platform ?

k02pradeep commented 6 years ago

Cordova app built for Android platform

AnanthaKrish commented 6 years ago

@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);
k02pradeep commented 6 years ago

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

AnanthaKrish commented 6 years ago

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