This adds Custom Payload support for Push Notifications

  • Fixed processing of apns payloads
  • Rules - Allowed Payloads to be sent, this can probably be moved to the admin ui as well (Uses options_element if it's enabled)
  • Some code refactoring since s lot of the functions for payloads/sending messages were very similar and I needed some custom payloads-
  • Optimizations for loading tokens (Just loaded them all at once instead of per use)

Still to do:

  • Allow Custom Payloads to be Sent in UI (Copy the code from the Rules UI to the other admin page)
  • More Testing with iOS / Android (I'll be doing this over the few weeks)
  • Hooks could be improved - right now I didn't add any but the current hook only hooks on the message and not the payload
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Derimagia created an issue. See original summary.

iadegesso’s picture

Hi,
do you think this patch should be useful to "fix" my request (https://www.drupal.org/node/2655492)?

Thank you in advance

Iade Gesso (MSc & PhD in Computer Science)

iadegesso’s picture

Ok, I tested it myself... and I found that your patch partially meets my needs. But, I found that sending bulk notifications via Rules was not able to manage custom payload... so, I started to modify the already patched code, but using the currently stable release of the module (7.x-1.2), and I got a solution that fully meets my needs.

I will attach my patch set to this post (it already includes the original patch)... hope, it will be merged in the master branch with your code! :)

Iade

tyler.frankenstein’s picture

Status: Active » Needs review