Phonegap(cordova) Pushplugin Silent Notification - Android

891 Views Asked by At

I am working on a chat application using phonegap for android, which is already running over web. I am sending messages through pushnotification and everything is working fine and notification is coming in status bar with default device sound setting. Now I want to sync some data from server without notifying user, means I need a notification that should just tell me that there is some new data on server to sync, without having status bar notification. I searched over web but couldn't found anything which can help me.

Any help would be great..

Thanks Jaya

1

There are 1 best solutions below

0
On

You could modify the plugin to not create a notification if a certain variable is set.

If you are using PushPlugin:

A notification is created only if you send message in the payload. But you will receive the payload in your application's callback. You can use this effectively to communicate with your application with having to implement anything additional.