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

Need background event listener on notification receive (Push.addListener('startup') called only when app is reopen) #325

Open NilkanthSoni opened 6 years ago

NilkanthSoni commented 6 years ago

Hi,

I need to listen notification receive event regardless of app is open,closed or is in background. I tried Push.addListener('startup') but it gets called when app is re-open from background state.

Actually i want to do some processing whenever there is new notification is received if app is open,closed or in background

raix commented 6 years ago

Message event is triggered when the is open

NilkanthSoni commented 6 years ago

@raix Message event is called when app is open, What about if app is in background or closed? i mean whenever notification is received , event should be called without tapping notification or re-opening an app

raix commented 6 years ago

startup = app is closed message = app is open

https://github.com/raix/push/blob/master/docs/ADVANCED.md#api-details