Meteor subscription as Cordova notification


On android, I am using the reactive property of Meteor to know when some backend data is updated and use that to generate a local notification. This way I avoid GCM but this works only when the app is not closed. Is there some way to make this work by putting the app in the background.


AFAIK, push notifications are the only reliable way to do this, especially on iOS. And I would also recommend using them since this reduces battery drain. Why shouldn’t you use push notifications? They’re free to use on both Android and iOS. Setup is somewhat complicated, but once you got the caveat, it works just fine. There’s even a package for it (raix:push). Unfortunately, this package has one big limitation: it will always ask the user on app startup if he wants to accept notifications.

It is just too tempting to use the reactive property- it is very fast.

1 Like

Use the raix:push package

I’m doing the exact same thing. Do you switch now ? :smile:

@leiduong :slight_smile:

I am thinking of building a cordova plugin as a service that will reactively listen for changes and wake up the main application if required.

On raix:push is there someway to not show a notification, say based on payload data?