raix-push
raix-push copied to clipboard
Are action buttons supported?
Hi Morten,
is it possible to have action buttons? Here an example from Phonegap and "Email guests" & "Snooze" as action buttons
Thanks
should be possible https://github.com/phonegap/phonegap-plugin-push#action-buttons
Not sure if I need to update schemas on the server
Looks like support for iOS action buttons was added in phonegap/phonegap-plugin-push@2ec769729ef75f49f9887a9509efe3b6368375c7 Need to update that dependency to latest version?
@pefi1011 hi .. can you pls confirm if you were able to create action buttons for android.. much appreciated!
thanks/rajpa
You can create action buttons by fixing a part of the code in Raix:push.
Line 300 in /lib/server/push.api.js
change
var data = (notification.payload) ? { ejson: EJSON.stringify(notification.payload) } : {};
to
var data = (notification.payload) ? (notification.payload) : {};
Line 312 add
if(typeof notification.actions !== 'undefined') { data.actions = notification.actions; }