You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A great feature to consider adding is handler for silent push notifications, which allows the application to respond to push notifications while running in the background, for example for fetching new data from the server, without requiring user interaction. The following code will print a line to the log on iOS when a notification is received:
Indeed, this new method was added in iOS 7 (here is a link to the API reference) but somehow was overlooked in the plugin. For native apps it works seamlessly, however, as far as I am concerned it depends if the OS guarantees the app will be awaken. We will consider implementing this if there is an appropriate Cordova way to plug into the background of the app when to supply a callback to this method via Cordova.
I need to mention that there is another way to ensure the app will be awaken in the background to consume pushed content via the 'content-available' key in the payload of the notification. You need to set it to 1 in the payload to invoke a handler that will download an available content. Yet we will need to check for a suitable Cordova implementation.
Though both approaches are slightly different, it feels appropriate to mention them and implement them in the plugin.
Let me know if you have further questions or suggestions.
A great feature to consider adding is handler for silent push notifications, which allows the application to respond to push notifications while running in the background, for example for fetching new data from the server, without requiring user interaction. The following code will print a line to the log on iOS when a notification is received:
I still haven't looked into Android implementation.
Currently the plugin only allows to respond to notifications once the user clicked a notification.
The text was updated successfully, but these errors were encountered: