Meteor-Community-Packages / raix-push

DEPRECATED: Push notifications for cordova (ios, android) browser (Chrome, Safari, Firefox)
https://atmospherejs.com/raix/push
MIT License
514 stars 197 forks source link

Support for multiple apps / Clarification #266

Closed nunof07 closed 7 years ago

nunof07 commented 7 years ago

Thanks for this awesome package.

I have the following scenario and was wondering if it's possible to implement it currently or if there is any plan to support it. Basically what I am looking for is a way to do either one of the following:

  1. Reconfigure Push with a different configuration.
  2. Support for multiple configurations.
  3. Let each individual Meteor app handle their associated notifications based on the user.

I have the following setup:

So basically something like this:

And I want to be able to do this:

Currently I have this:

So I can send notifications A->A and B->B, but how to send A->B?

Ideally server A would create the notification and then server B would process it.

raix commented 7 years ago

you could add an endpoint for the server communication or use the same collection for all apps for the push collections (app + notifications)

nunof07 commented 7 years ago

Thank you for your help.

I understand your first suggestion, but the second one I'm having trouble understanding how it would work.

Currently all apps use the same collection (they all share the same database) and each app is configured with different certificates.

If I need to send notifications to multiple devices from one of the apps, how would that work on your second suggestion?

raix commented 7 years ago

ah ok, at the moment this package doesn't support multiple certificates so creating an endpoint might be the best option

nunof07 commented 7 years ago

Since all apps share the same database what I ended up doing was the following:

In this way each app can have its own configuration and we communicate between apps so that the proper one sends the notification.