Page 1 of 1

Push notification action buttons from javascript API

Posted: Thu Apr 28, 2016 7:47 pm
by wmworia

How do I get action buttons to show from a PN sent from server code? This doesnt seem to work, the notification shows up but without the button:

Apperyio.PN.send(pushApiKey, {
payload: {
"title": "TITLE",

Code: Select all

 "message": message, 

 "additionalData": [{ 
   "page": "page" 
 }], 

 "actionButtons": [{ 
   "buttonTitle": "View", 
   "buttonCallback": "pushOpenPage" 
 }] 

}
});


Push notification action buttons from javascript API

Posted: Fri Apr 29, 2016 8:44 am
by Serhii Kulibaba

Hello,

Server code doesn't have an access to the application layount. You can show/hide any button with JS (https://devcenter.appery.io/documenta...) on the server code service success event (https://devcenter.appery.io/documenta...)


Push notification action buttons from javascript API

Posted: Fri Apr 29, 2016 11:06 am
by BananaGator

Use title and callback, not buttonTitle and buttonCallback.

https://devcenter.appery.io/documenta...
Image


Push notification action buttons from javascript API

Posted: Fri Apr 29, 2016 9:04 pm
by wmworia

Thanks!