Meteor subscription as Cordova notification


#1

Hi

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.

Cheers


#2

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.


#3

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


#4

Use the raix:push package


#5

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


#6

@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?