4

I have set up and configured the Push Notifications module for a site. But, I want to automatically send a Push Notification to all the mobile devices registered in the site when content of an specific content type is created. Can this be done?

I have called the content type "alert", and the user that can send alerts doesn't have access to the administration console, where the push is sent from.

2

Use the Rules integration of the Push Notifications module. Refer to the issue "Add support for Rules module" for more details on this (issue status = needs review ...) and also use the appropriate patch from that issue.

For the "event" part of such rule to be created, just use "After saving content", limited to (= Rules condition) content type "alert".

If you have to still install the Rules module, you'll discover tons of other use cases to also be resolved by the same Rules module (possibly complemented with the Flag module soon ...).

1

Haven't used that particular module but, there are a few ways you could do this. Create a rule to send a push notification when an alert is created. It looks like from the module page that some work is needed with Rules integration. I would look there to see specifics on how to do this w/ Rules.

https://www.drupal.org/node/1658132#comment-8512423

You could also create a custom module to send a notification. You would use the hook_node_insert() and problematically send the notification.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.